网页特效放送:跟随鼠标的图片的网页代码
发布时间:2006-07-29 09:25:08 来源:天极网 网友评论 0 条<script LANGUAGE="JavaScript">
var newtop=0; var newleft=0; if (navigator.appName == "Netscape") {; layerStyleRef="layer.";
layerRef="document.layers"; styleSwitch=""; }; else; {; layerStyleRef="layer.style."; layerRef="document.all";
styleSwitch=".style"; }; function doMouseMove() {; layerName = 'iit'; eval('var curElement='+layerRef+'["'+layerName+'"]')
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"'); eval('curElement'+styleSwitch+'.visibility="visible"')
eval('newleft=document.body.clientWidth-curElement'+styleSwitch+'.pixelWidth')
eval('newtop=document.body.clientHeight-curElement'+styleSwitch+'.pixelHeight')
eval('height=curElement'+styleSwitch+'.height')
eval('width=curElement'+styleSwitch+'.width')
width=parseInt(width)
height=parseInt(height)
if (event.clientX > (document.body.clientWidth - 5 - width))
{
newleft=document.body.clientWidth + document.body.scrollLeft - 5 - width
}
else
{
newleft=document.body.scrollLeft + event.clientX
}
eval('curElement'+styleSwitch+'.pixelLeft=newleft')
var newtop=0; var newleft=0; if (navigator.appName == "Netscape") {; layerStyleRef="layer.";
layerRef="document.layers"; styleSwitch=""; }; else; {; layerStyleRef="layer.style."; layerRef="document.all";
styleSwitch=".style"; }; function doMouseMove() {; layerName = 'iit'; eval('var curElement='+layerRef+'["'+layerName+'"]')
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"'); eval('curElement'+styleSwitch+'.visibility="visible"')
eval('newleft=document.body.clientWidth-curElement'+styleSwitch+'.pixelWidth')
eval('newtop=document.body.clientHeight-curElement'+styleSwitch+'.pixelHeight')
eval('height=curElement'+styleSwitch+'.height')
eval('width=curElement'+styleSwitch+'.width')
width=parseInt(width)
height=parseInt(height)
if (event.clientX > (document.body.clientWidth - 5 - width))
{
newleft=document.body.clientWidth + document.body.scrollLeft - 5 - width
}
else
{
newleft=document.body.scrollLeft + event.clientX
}
eval('curElement'+styleSwitch+'.pixelLeft=newleft')
if (event.clientY > (document.body.clientHeight - 5 - height))
{
newtop=document.body.clientHeight + document.body.scrollTop - 5 - height
}
else
{
newtop=document.body.scrollTop + event.clientY
}
eval('curElement'+styleSwitch+'.pixelTop=newtop')
}
document.onmousemove = doMouseMove;
</script>
<script language="javascript">
if (navigator.appName == "Netscape") {
}
else
{
document.write('<div ID=OuterDiv>')
document.write('<img ID=iit src="图片地址" STYLE="position:absolute;TOP:5pt;LEFT:5pt;Z-INDEX:10;visibility:hidden;">')
document.write('</div>')
}
</script>
{
newtop=document.body.clientHeight + document.body.scrollTop - 5 - height
}
else
{
newtop=document.body.scrollTop + event.clientY
}
eval('curElement'+styleSwitch+'.pixelTop=newtop')
}
document.onmousemove = doMouseMove;
</script>
<script language="javascript">
if (navigator.appName == "Netscape") {
}
else
{
document.write('<div ID=OuterDiv>')
document.write('<img ID=iit src="图片地址" STYLE="position:absolute;TOP:5pt;LEFT:5pt;Z-INDEX:10;visibility:hidden;">')
document.write('</div>')
}
</script>
- 推荐阅讯
- 特效:总在右上角旋转显示的字符
- 特效:显示可移动的层并可关闭
- JavaScript代码可导致浏览器攻击
- 页面中文乱码之完全Script解决方案
- 别出心裁搞一搞 日期相加的函数addDate
- 分析一下网页子窗口和网页父窗口的交互
- javascript显示页面所有链接
- 网页特效:随机显示广告的JS源代码
- 网页特效实例:用js获取单选按钮的数据
- JS页内查找关键词的高亮显示
- 阅读排行
- 1.网页特效:一段实用的图片滚动显示代码
- 2.网页特效实例:用js获取单选按钮的数据
- 3.Javascript特效:随机显示图片的源代码
- 4.Javascript技术技巧大全
- 5.IE和FireFox下javascript读写XML实现广告轮
- 6.用 JavaScript 来操作字符串的函数
- 7.添加到收藏夹的Javascript脚本-适合IE和Fir
- 8.怎样判断浏览器是否支持javascript?
- 9.JavaScript实现网页图片等比例缩放
- 10.网页特效:随机显示广告的JS源代码
- 专题教程
- Windows Server-Windows Server文档-Windows Server新闻-Windows Ser PostgreSQL-PostgreSQL文档-PostgreSQL新闻-PostgreSQL专家
- WebLogic-WebLogic文档-WebLogic新闻-WebLogic专家 FreeBSD-FreeBSD文档-FreeBSD新闻-FreeBSD专家
- Linux-内核 GUI KDE Gnome DNS FTP 安全 安装-Linux专区 Windows-AD IIS ServerCore 虚拟化 安全 HPC-Windows专区
- 大话G游 专题:手机病毒揭密
- ARP攻击防范与解决方案 路由故障处理手册
