打印

急需~~msn交流的代码

我是做美工的,js不是很懂,谁有漂浮在页面两边的点击进行msn交流的代码。小弟跪求~
<a href="msnim:chat?contact=xxx@hotmail.com" target="_blank" >在线MSN</a>

我只有点击  没有漂浮

回复 shaohua162001 在 2# 的帖子

真是很感谢,不过我需要漂浮的~

回复 ptzhengzhixi 在 3# 的帖子

现在漂浮广告给人感觉很浮躁  令人反感
建议你弄个漂漂亮亮的图片 放在一个显眼的位置上
起码不会被浏览器屏蔽掉

TOP

还在为头像烦恼?还在为不能关注好友动态烦忧?快来蓝色理想家园吧!
客户就要那个~很是郁闷

TOP

唉 只好拿出我以前压箱底的法宝了  
<script language="Javascript" src="ad.js"></script>
把这个脚本加到网页的尾部就可以了
里面的设置自己改吧
复制内容到剪贴板
代码:
var delta=0.015;
var collection;
var closeB=false;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
var newItem = {};
newItem.object = document.getElementById(id);
newItem.x = x;
newItem.y = y;
this.items[this.items.length] = newItem;
}
this.play = function()
{
collection = this.items
setInterval('play()',30);
}
}
function play()
{
if(screen.width<=800 || closeB)
{
for(var i=0;i<collection.length;i++)
{
collection[i].object.style.display = 'none';
}
return;
}
for(var i=0;i<collection.length;i++)
{
var followObj = collection[i].object;
var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
var followObj_y = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);
if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
followObj.style.left=followObj.offsetLeft+dx;
}
if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
followObj.style.top=followObj.offsetTop+dy;
}
followObj.style.display = '';
}
}
function closeBanner()
{
closeB=true;
return;
}
var theFloaters = new floaters();
//
theFloaters.addItem('followDiv1','document.body.clientWidth-100',0,'<a onClick="closeBanner();" href=http://www.xgxschool.com/xgxschool/website/news.asp?id=972><img src=http://www.xgxschool.com/xgxschool/website/pic/banner04.gif width=100 height=270 border=0 ></a><img src=http://www.xgxschool.com/xgxschool/website/pic/close.gif onClick="closeBanner();">');  
theFloaters.addItem('followDiv2',0,0,'<a onClick="closeBanner();" href=http://www.xgxschool.com/kw/news.asp?id=574><img src=http://www.xgxschool.com/xgxschool/website/pic/banner00.gif width=100 height=270 border=0 ></a><img src=http://www.xgxschool.com/xgxschool/website/pic/close.gif onClick="closeBanner();">');  
theFloaters.play();
[ 本帖最后由 shaohua162001 于 2008-6-30 10:48 编辑 ]

TOP

跪谢~~~~~~~~

TOP

大哥,这不是漂浮在页面两边的点击进行msn交流的代码
呜呜~~~~~~~

TOP

试一试加上你<a href="msnim:chat?contact=xxx@hotmail.com" target="_blank" >在线MSN</a>这段看看行不行~~~~~~~努力中~~~~~~~~~~~~

TOP

老大  脚本下面一些东西改改就行了
复制内容到剪贴板
代码:
var theFloaters = new floaters();
//
theFloaters.addItem('followDiv1','document.body.clientWidth-100',0,'<a onClick="closeBanner();" href="msnim:chat?contact=xxx@hotmail.com" target="_blank" ><img src=http://www.xgxschool.com/xgxschool/website/pic/banner04.gif width=100 height=270 border=0 ></a><img src=http://www.xgxschool.com/xgxschool/website/pic/close.gif onClick="closeBanner();">');  
theFloaters.addItem('followDiv2',0,0,'<a onClick="closeBanner();" href="msnim:chat?contact=xxx@hotmail.com" target="_blank"><img src=http://www.xgxschool.com/xgxschool/website/pic/banner00.gif width=100 height=270 border=0 ></a><img src=http://www.xgxschool.com/xgxschool/website/pic/close.gif onClick="closeBanner();">');  
theFloaters.play();

TOP

哦~!不好意思!偶是代码白痴~(学习中~~~~)

TOP

你不嚼烂吐他口里 她会拉肚子的
Welcome to the tavern of the rising sun!

TOP

回复 ptzhengzhixi 在 11# 的帖子

静下心来 看看就明白了

TOP