常用网页漂浮广告代码
网站代码
首页>网页特效>窗口页面网页上漂浮的客服代码(漂浮框架兼容各大浏览器)作者: 来源: 更新时间:2012-4-30 1:20:26 点击:5976返回栏目列表栏目订阅好友分享讨论交流打印本页添加收藏投稿发布常见网页上的漂浮客服窗口,是一个漂浮框架,各位可以拿去用。
在chrome、ie、firefox下测试正常。
以下是部分代码(可点击演示查看或直接下载源代码):<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>网站客服漂浮框架(兼容各大浏览器)-网页特效代码()</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /><style type="text/css">.kfoutbox{position:absolute;z-index:10000;right:5px;margin:0px;width:80px;height:150p x;background:#ff0000;}</style></head><body style="margin:0px;padding:0px;font-size:12px;"><div style="margin:0px auto;padding-top:200px;width:980px;height:800px;text-align:center;background:#f2f2f2 ;">这里是网页的内容区<br><a href="/">手持机</a></div><div id="kfoutbox" class="kfoutbox"><span id="kfboxclose" style="color:#ffffff">关闭按钮</span></div><script language="javascript">var default_top_ps = 100;var evans_agt = erAgent.toLowerCase();var evans_ie = ((evans_agt.indexOf("msie") != -1) && (evans_agt.indexOf("opera") == -1) && (evans_agt.indexOf("omniweb") == -1));var evans_mymovey = new Number();function evans_IeTrueBody() {return (patMode && patMode != "BackCompat") ? document.documentElement: document.body}function evans_GetScrollTop() {return evans_ie ? evans_IeTrueBody().scrollTop: window.pageYOffset}function evans_heartBeat() {evans_diffY = evans_GetScrollTop();evans_mymovey += Math.floor((evans_diffY - document.getElementById('kfoutbox').style.top.replace("px", "") + default_top_ps) * 0.1);document.getElementById('kfoutbox').style.top = evans_mymovey + "px"}var evans_tmpintval = window.setInterval("evans_heartBeat()", 1);if (document.getElementById('kfboxclose')) {document.getElementById('kfboxclose').onclick = function() {window.clearInterval(evans_tmpintval);document.getElementById('kfoutbox').style.display = 'none'}}var popupdelay = 0;var maxpoptimes = 3;var prepoptime = '10';function Tong_MoveDiv() {this.Move = function(Id, Evt, T) {if (Id == "") {return}var o = document.getElementById(Id);if (!o) {return}evt = Evt ? Evt: window.event;o.style.position = "absolute";o.style.zIndex = 200;var obj = evt.srcElement ? evt.srcElement: evt.target;var w = o.offsetWidth;var h = o.offsetHeight;var l = o.offsetLeft;var t = o.offsetTop;var div = document.createElement("DIV");document.body.appendChild(div);div.style.cssText = "filter:alpha(Opacity=10,style=0);opacity:0.2;width:" + w + "px;height:" + h + "px;top:" + t + "px;left:" + l + "px;position:absolute;background:#000";div.setAttribute("id", Id + "temp");this.Move_OnlyMove(Id, evt, T)};this.Move_OnlyMove = function(Id, Evt, T) {var o = document.getElementById(Id + "temp");if (!o) {return}var evt = Evt ? Evt: window.event;var relLeft = evt.clientX - o.offsetLeft;var relTop = evt.clientY - o.offsetTop;if (!window.captureEvents) {o.setCapture()} else {window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP)}document.onmousemove = function(e) {if (!o) {return}e = e ? e: window.event;var bh = Math.max(document.body.scrollHeight, document.body.clientHeight, document.body.offsetHeight, document.documentElement.scrollHeight, document.documentElement.clientHeight, document.documentElement.offsetHeight);var bw = Math.max(document.body.scrollWidth, document.body.clientWidth, document.body.offsetWidth, document.documentElement.scrollWidth, document.documentElement.clientWidth, document.documentElement.offsetWidth);var sbw = 0;if (document.body.scrollWidth < bw) sbw = document.body.scrollWidth;if (document.body.clientWidth < bw && sbw < document.body.clientWidth) sbw = document.body.clientWidth;if (document.body.offsetWidth < bw && sbw < document.body.offsetWidth) sbw = document.body.offsetWidth;if (document.documentElement.scrollWidth < bw && sbw < document.documentElement.scrollWidth) sbw = document.documentElement.scrollWidth;if (document.documentElement.clientWidth < bw && sbw < document.documentElement.clientWidth) sbw = document.documentElement.clientWidth;if (document.documentElement.offsetWidth < bw && sbw < document.documentElement.offsetWidth) sbw = document.documentElement.offsetWidth;if (e.clientX - relLeft <= 0) {o.style.left = 0 + "px"} else if (e.clientX - relLeft >= bw - o.offsetWidth - 2) {o.style.left = (sbw - o.offsetWidth - 2) + "px"} else {o.style.left = e.clientX - relLeft + "px"}if (e.clientY - relTop <= 1) {o.style.top = 1 + "px"} else if (e.clientY - relTop >= bh - o.offsetHeight - 30) {o.style.top = (bh - o.offsetHeight) + "px"} else {o.style.top = e.clientY - relTop + "px"}};document.onmouseup = function() {if (!o) return;if (!window.captureEvents) {o.releaseCapture()} else {window.releaseEvents(Event.MOUSEMOVE | Event.MOUSEUP) }var o1 = document.getElementById(Id);if (!o1) {return}var l0 = o.offsetLeft;var t0 = o.offsetTop;var l = o1.offsetLeft;var t = o1.offsetTop;Kf54MyMove.Move_e(Id, l0, t0, l, t, T);document.body.removeChild(o);o = null}};this.Move_e = function(Id, l0, t0, l, t, T) {if (typeof(window["ct" + Id]) != "undefined") {clearTimeout(window["ct" + Id])}var o = document.getElementById(Id);if (!o) return;var sl = st = 8;var s_l = Math.abs(l0 - l);var s_t = Math.abs(t0 - t);if (s_l - s_t > 0) {if (s_t) {sl = Math.round(s_l / s_t) > 8 ? 8 : Math.round(s_l / s_t) * 6 } else {sl = 0}} else {if (s_l) {st = Math.round(s_t / s_l) > 8 ? 8 : Math.round(s_t / s_l) * 6 } else {st = 0}}if (l0 - l < 0) {sl *= -1}if (t0 - t < 0) {st *= -1}if (Math.abs(l + sl - l0) < 52 && sl) {sl = sl > 0 ? 2 : -2}if (Math.abs(t + st - t0) < 52 && st) {st = st > 0 ? 2 : -2}if (Math.abs(l + sl - l0) < 16 && sl) {sl = sl > 0 ? 1 : -1}if (Math.abs(t + st - t0) < 16 && st) {st = st > 0 ? 1 : -1}if (s_l == 0 && s_t == 0) {return}if (T) {o.style.left = l0 + "px";o.style.top = t0 + "px";return} else {if (Math.abs(l + sl - l0) < 2) {o.style.left = l0 + "px"} else {o.style.left = l + sl + "px"}if (Math.abs(t + st - t0) < 2) {o.style.top = t0 + "px"} else {o.style.top = t + st + "px"}window["ct" + Id] = window.setTimeout("Kf54MyMove.Move_e('" + Id + "', " + l0 + " , " + t0 + ", " + (l + sl) + ", " + (t + st) + "," + T + ")", 1)}}};</script> </body> </html>。
各类漂浮广告代码、弹窗广告代码大全
</SCRIPT>
参数解释:
<SCRIPT LANGUAGE="java script"> js脚本开始;
window.open 弹出新窗口的命令;
'page.html' 弹出窗口的文件名;
'newwindow' 弹出窗口的名字(不是文件名),非必须,可用空''代替;
window.open(′url′,′窗口名′,′属性列表′);
〈/script〉
其中“url”是在窗口中显示的html文档的地址;“窗口名”可任意起一个,但不要用中文;“属性列表”是一个用逗号分开的各个属性值的字符串,它确定了弹出窗口的外观与状态。常用属性有:
toolbar(是否显示工具栏
将下面这段代码插入你的页面中,在页面加载时就会自动弹出一个窗口,并打开Google搜索引擎,是不是很简单啊!
将代码放置在〈!?XXX --〉中间是为了兼容较低版本浏览器的需要,在低版本的浏览器中标签内的内容将被视作注视。
打开的页面使用绝对路径(http://)或相对路径(../page.htm)都可以。
-->
</script>
然后,在相同目录下新建一个popup.htm网页(注意要与上面的url对应!),用于显示在弹出窗口中。在新建文件的源代码中加入如下代码:
代码:
<script language="java script">
function closeit() {
setTimeout("self.close()",10000)
网站JS浮动广告代码
网站Js浮动广告代码//JS代码:var delta=0.08var collection;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)+'">'+cont ent+'</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.itemssetInterval('play()',10);}}function play(){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)) {vardx=(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)) {vardy=(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 = '';}}var theFloaters = new floaters();//右侧浮动广告代码(QQ对话栏):theFloaters.addItem('followDiv1','document.body.clientWidth-140',195,'<a target="_blank" href="/msgrd?v=3&uin=2357484552&site=qq&menu=yes"><img border="0" src="/pa?p=2:2357484552:53" alt="give me message" title="click here"></a>');//左侧浮动广告代码(可调用flash或图片):theFloaters.addItem('followDiv2',6,80,'<EMBED src="..." quality=high WIDTH=100 HEIGHT=300 TYPE=application/x-shockwave-flash id=ad wmode=opaque></EMBED>');theFloaters.play();//广告图片的调用方法://<a href=/lanren/ target=_blank><img src=images/ad_100x300.jpg border=0></a>。
常用的网页特效代码
常用的网页特效代码1.文本向上循环滚动说明:文本自动向上循环滚动,鼠标放到上面还会暂时停下来。
果:代码:2.页面自动滚屏效果<body onLoad="scrollit()"><SCRIPT language="JavaScript"><!--function scrollit(){for (I=1; I<=500; I++){self.scroll(1,I)}}//--></SCRIPT>3.滚动的文字说明说明鼠标放到链接上就会出现一个说明框,里面有滚动的文字说明效果把鼠标放上来试试代码4.飘动的字符跟随鼠标说明在鼠标后面跟着一串飘动的字符效果看看就知道啦!Array代码5.一群小点跟随鼠标说明跟随鼠标的一群小点,就象星星一样效果看看就知道啦!代码6.接触链接自动打开窗口说明鼠标放到链接上,就立刻弹出警告框效果试试Array代码7.数字时钟说明数字化的时钟效果 现在时刻:12:07:54代码8.显示停留的时间说明 显示他人在页面停留的时间,而且可以作出提醒效果代码 9.有影子的数字时钟说明 这个时钟是有影子的,而且还在不停地走着呢效果12:09:3612:09:36代码10.打字效果说明:文字在状态栏上从左往右一个一个地显示,就象你打出的字一样效果:看看状态栏!Array代码:11.文字不停闪烁说明:一段文字在状态栏上不停跳动显示,可以作为提示信息效果:看看状态栏!代码:12.图象大小自动变化说明:把一张图片变形扭曲成各种不同的长宽,非常好玩效果:代码:13.漫天飞雪说明:漫天飞雪效果:看到了吗?代码:14.自由移动的图片(一)说明:自由移动的图片效果:看到了吗?Array代码:再把<body>改为:说明:图片在页面内随意飘动,遇到边界还会反弹。
效果: 看到了吗?代码:16.状态栏里的动态欢迎语说明 浏览器的状态栏里出现一个字接一个字往左跑的欢迎语!效果 看看状态栏:)代码17.背景色变换按钮:18.去掉超链接的下划线说明有时候看着那超链接的下划线挺讨厌的,把下面这段代码放到网页源代码<head>与</head>之间,下划线就无影无踪啦!注意,网页的<body>标签里不能再有link之类的属性,否则本效果会失效!效果试试就知道啦!代码19.给页面加保护说明如果你不想让辛辛苦苦做出来的东西被人轻易地Copy&Paste走的话,不妨在HTML里加入下面这段代码。
网页浮动窗口代码
1. 右栏浮动广告QUOTE:<script language=javascript>var specialcode="<DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 180px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='border-left:1px solid #2E6287;border-top:1px solid #2E6287;border-right:1px solid #2E6287;font-size:12px;color:#ffffff; border-bottom-color:#2E6287; border-bottom-width:1px'><TR bgcolor=#2E6287><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关闭</TD></TR></TABLE><table border='1' width='150' id='table1' height='500' bordercolor='#2E6287'><tr><td>广告内容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;functionheartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percen t=Math.ceil(percent);elsepercent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScr ollY+percent;}window.setInterval("heartBeat0()",1);</script>2.左栏浮动广告QUOTE:<script language=javascript>var specialcode="<DI V id=searchspe style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关闭</TD></TR></TABLE><table border='1' width='150' id='table1' bordercolor='#2E6287' height='500'><tr><td>广告内容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;functionheartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percen t=Math.ceil(percent);elsepercent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScr ollY+percent;}window.setInterval("heartBeat0()",1);</script>3.左栏固定广告QUOTE:<DIV id=searchspe style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关闭</TD></TR></TABLE>广告内容</DIV>4.右栏固定广告QUOTE:<DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关闭</TD></TR></TABLE>广告内容</DIV>5.漂浮广告代码QUOTE:<div id="img" style="position:absolute;; width: 200; height: 151">广告内容</div><script LANGUAGE="JavaScript">var xPos = 20;var yPos = 10;img.style.left= xPos;img.style.top = yPos;var step = 1;var delay = 30;var width,height,Hoffset,Woffset;var y = 1;var x = 1;var interval;img.visibility = "visible";function changePos(){width = document.body.clientWidth;height = document.body.clientHeight;Hoffset = img.offsetHeight;Woffset = img.offsetWidth;if (y){yPos = yPos + step;}else{yPos = yPos - step;}if (yPos < 0){y = 1;yPos = 0;}if (yPos >= (height - Hoffset)){y = 0;yPos = (height - Hoffset);}if (x){xPos = xPos + step;}else{xPos = xPos - step;}if (xPos < 0){x = 1;xPos = 0;}if (xPos >= (width - Woffset)){x = 0;xPos = (width - Woffset);}img.style.left = xPos + document.body.scrollLeft; img.style.top = yPos + document.body.scrollTop; }function start(){interval = setInterval('changePos()', delay);}function pause_resume(){clearInterval(interval);}start();</script>6.固定对联QUOTE:<DIV id=searchspe style='Z-INDEX: 100; right: 5px; POSITION: absolute; TOP: 50px;'><TABLE cellSpac ing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#C54A00><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关闭</TD></TR></TABLE>广告内容</DIV><DIV id=searchspe2 style='Z-INDEX: 100; left: 5px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#12BDFF><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe2.style.visibility='hidden' width=30>关闭</TD></TR></TABLE>广告内容</DIV>7.随动对联QUOTE:<script language=javascript>function close163news(){searchspe.style.visibility='hidden';searchspe2.style.visibility='hidden';} var specialcode="<DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 30px;'><TABLE cellSpac ing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#C54A00><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick='close163news()' width=30>关闭</TD></TR></TABLE>广告内容</DIV>";document.write(specialcode);lastScrollX=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollX);if(percent>0)percen t=Math.ceil(percent);elsepercent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollX=lastScr ollX+percent;}window.setInterval("heartBeat0()",1);var specialcode2="<DIV id=searchspe2 style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 30px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#12BDFF><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick='close163news()' width=30>关闭</TD></TR></TABLE>广告内容</DIV>";document.write(specialcode2);lastScrollY=0;function heartBeat1(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percen t=Math.ceil(percent);elsepercent=Math.floor(percent);document.all.searchspe2.style.pixelTop+=percent;lastScrollY=lastSc rollY+percent;}window.setInterval("heartBeat1()",1);</script>8.qq好友上线广告代码QUOTE:<!-- 代码开始请将下面的代码放到body结束标签之前--><DIV id=eMengstyle="BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 64px; VISIBILITY: hidden; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 168px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 374px; HEIGHT: 115px; BACKGROUND-COLOR: #c9d3f3"><TABLE style="BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid" cellSpacing=0 cellPadding=0 width="100%" bgColor=#cfdef4 border=0><TBODY><TR><TDstyle="FONT-SIZE: 12px; BACKGROUND-IMAGE: none; COLOR: #0f2c8c"width=30 height=24> </TD><TDstyle="PADDING-LEFT: 4px; FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-IMAGE: none; COLOR: #1f336b; PADDING-TOP: 4px"vAlign=center width="100%"><span class="style13">本站提示</span></TD><TD vAlign=center align=right width=19 2px? padding-top: 2px;padding-right:><SPAN title=关闭style="FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: red; MARGIN-RIGHT: 4px"onclick=closeDiv()>×</SPAN></TD></TR><TR><TDstyle="PADDING-RIGHT: 1px; BACKGROUND-IMAGE: none; PADDING-BOTTOM: 1px" colSpan=3 height=90><DIVstyle="BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 13px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 13px; FONT-SIZE: 12px; PADDING-BOTTOM: 13px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 18px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%"><div align="left"> <span style="text-decoration: none"><FONTcolor=#FF0000>仿造qq好友上线<br><center> </center></FONT></span></div></DIV></td></tr></table><SCRIPT language=JavaScript>window.onload = getMsg;window.onresize = resizeDiv;window.onerror = function(){}var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;function getMsg(){try{divTop = parseInt(document.getElementById("eMeng").style.top,10)divLeft = parseInt(document.getElementById("eMeng").style.left,10)divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)docWidth = document.body.clientWidth;docHeight = document.body.clientHeight;document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeightdocument.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidthdocument.getElementById("eMeng").style.visibility="visible"objTimer = window.setInterval("moveDiv()",10)}catch(e){}}function resizeDiv(){try{divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)docWidth = document.body.clientWidth;docHeight = document.body.clientHeight;document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)}catch(e){}}function moveDiv(){try{if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10))){window.clearInterval(objTimer)objTimer = window.setInterval("resizeDiv()",1)}divTop = parseInt(document.getElementById("eMeng").style.top,10)document.getElementById("eMeng").style.top = divTop - 1}catch(e){}}function closeDiv(){document.getElementById('eMeng').style.visibility='hidden';if(objTimer) window.clearInterval(objTimer)}</SCRIPT>9:网页中的分享代码:<div id="ckepop"><a title="分享到新浪微博" class="jiathis_button_tsina"></a><a title="分享到QQ收藏" class="jiathis_button_qq"></a><a title="分享到开心网" class="jiathis_button_kaixin001"></a><a title="分享到人人网" class="jiathis_button_renren"></a><span class="separator">|</span><a href="/share/" class="jiathis button jtico jtico_more" target="_blank">更多</a> </div> <script type="text/javascript" src="/code/jia.js" charset="utf-8 "></script>是不是觉得图标太少了?来分析下这段JS。
悬浮广告代码-js手机端网站底部和头部悬浮html广告代码教程【附实例】
悬浮⼴告代码-js⼿机端⽹站底部和头部悬浮html⼴告代码教程【附实例】<script>document.write("<style>");document.write("#topNavad{background-color:#fff0; z-index:999; position:fixed; top:0; left:0; width:100%; _position:absolute;");document.write("_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); overflow:visible; }");document.write("#bottomNavad{background-color:#fff0; z-index:999; position:fixed; bottom:0; left:0; width:100%; _position:absolute;");document.write("_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); overflow:visible; }");document.write("<\/style>");document.write("");document.write(" ");document.write("<!--头部-->");document.write("<div id=\"topNavad\">");document.write("<div id=\"MyDiv2\">");document.write("<div id=\"newsImg\">");document.write("<center>");document.write("<a href=\"https:\/\/\" rel=\"nofollow\" target=\"_blank\">");document.write("<img src=\"shunwang.jpg\" title=\"AD\" \/ style=\"width:100%\">");document.write("<\/a>");document.write("<\/center>");document.write("<\/div>");document.write("<span onclick='CloseDiv(\"MyDiv2\")' style=\"text-align:right; display:block;\">关闭<\/span>");document.write("");document.write("<\/div>");document.write("<\/div>");document.write("<!--头部end-->");document.write("");document.write("<!--底部-->");document.write("<div id=\"bottomNavad\">");document.write("<div id=\"MyDiv1\">");document.write("<span onclick='CloseDiv(\"MyDiv1\")' style=\"text-align:right; display:block;\">关闭<\/span>");document.write("<center>");document.write("<a href=\"https:\/\/\" rel=\"nofollow\" target=\"_blank\">");document.write("<img src=\"shunwang.jpg\" title=\"AD\" \/ style=\"width:100%\">");document.write("<\/a>");document.write("<\/center>");document.write("<\/div>");document.write("<\/div>");document.write("<!--底部end-->");document.write("");function CloseDiv(div) {document.getElementById(div).style.display = 'none';};</script>悬浮⼴告代码-js⼿机端⽹站底部和头部悬浮html⼴告代码教程-移动端的悬浮⼴告代码html版本:<style>#topNavad{background-color:#fff0; z-index:999; position:fixed; top:0; left:0; width:100%; _position:absolute;_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); overflow:visible; }#bottomNavad{background-color:#fff0; z-index:999; position:fixed; bottom:0; left:0; width:100%; _position:absolute;_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); overflow:visible; }</style><!--头部--><div id="topNavad"><div id="MyDiv2"><div id="newsImg"><center><a href="https://" rel="nofollow" target="_blank"><img src="shunwang.jpg" title="AD" / style="width:100%"></a></center></div><span onclick='CloseDiv("MyDiv2")' style="text-align:right; display:block;">关闭</span></div></div><!--头部end--><!--底部--><div id="bottomNavad"><div id="MyDiv1"><span onclick='CloseDiv("MyDiv1")' style="text-align:right; display:block;">关闭</span> <center><a href="https://" rel="nofollow" target="_blank"><img src="shunwang.jpg" title="AD" / style="width:100%"></a></center></div></div><!--底部end--><script>function CloseDiv(div) {document.getElementById(div).style.display = 'none';};</script>。
漂浮广告的JS代码
<html><head><meta http-equiv="Content-Type" mrc="text/html; charset=gb2312" /><title>漂浮广告</title></head><body><DIV id=img1 style="Z-INDEX: 100; LEFT: 2px; WIDTH: 59px; POSITION: absolute; TOP: 43px; HEIGHT: 61px;visibility: visible;"><a href="" target="_blank"><img src="/jscss/demoimg/200908/pic.gif" width="80" height="80" border="0"></a></DIV><SCRIPT>var xPos = 300;var yPos = 200;var step = 1;var delay = 30;var height = 0;var Hoffset = 0;var Woffset = 0;var yon = 0;var xon = 0;var pause = true;var interval;img1.style.top = yPos;function changePos(){width = document.body.clientWidth;height = document.body.clientHeight;Hoffset = img1.offsetHeight;Woffset = img1.offsetWidth;img1.style.left = xPos + document.body.scrollLeft;img1.style.top = yPos + document.body.scrollTop;if (yon){yPos = yPos + step;}else{yPos = yPos - step;}if (yPos < 0){yon = 1;yPos = 0;}if (yPos >= (height - Hoffset)){yon = 0;yPos = (height - Hoffset);}if (xon){xPos = xPos + step;}else{xPos = xPos - step;}if (xPos < 0){xon = 1;xPos = 0;}if (xPos >= (width - Woffset)){xon = 0;xPos = (width - Woffset); } }function start(){img1.visibility = "visible";interval = setInterval('changePos()', delay);}function pause_resume(){if(pause){clearInterval(interval);pause = false;}else{interval = setInterval('changePos()',delay);pause = true;}}start();</SCRIPT></body></html>。
常用网页广告代码全集-js广告代码大全
一条滚动下载伸缩广告下载轮换下载焦点图广告下载77:FLASH+XML迅雷影片广告特效下载78:韩国购物网FLASH滚动广告下载79:Flash+XML滚动新闻代码下载80:西安腾讯网flash焦点广告下载81:四屏flash图片轮换代码下载82:图片渐变轮换焦点图效果下载83:CSS写的图片滚动下拉广告下载84:MSN超酷flash图片轮换下载85:沪江英语网3图弹性广告下载86:SOHU体育flash图片轮换下载87:MSN频道4屏新闻广告效果下载88:用层实现的滚动条效果下载89:迅雷网七屏flash 广告轮换下载90:奥林匹克运动会焦点广告下载91:一种选项卡样式广告代码下载92:网站页首可关闭广告条下载93:flash无限图片展示广告下载94:电子杂志首页flash焦点图下载95:Zcom电子杂志flash焦点图下载96:flash滑动焦点图广告代码下载97:9格FLASH图片广告代码下载98:MSN健康频道CSS标准焦点图下载99:JS带缩略图的5屏轮换广告下载100:JS4屏焦点图轮换代码下载101:索尼中国Flash+Xml广告下载102:弹性菜单样式的图片展示下载103:带摘要的Flash图片代码下载104:JS图片卷帘门效果下载105:3d图片墙flash+xml 下载106:360度旋转展示flash+xml 下载107:带翻页的JS图片切换效果下载108:JS三图横向平滑切换下载109:四屏切换JS广告代码下载110:JavaScript图片切换效果下载111:在线客服代码下载112:单独关闭的两边悬挂代码下载113:全屏可伸缩可关闭广告代码下载114:四屏JS带缩略图的焦点图下载115:书角带阴影的撕页广告效果下载116:JS+flash可上下翻页焦点图下载117:广告自动轮播代码演示下载118 :3屏Flash竖焦点图广告演示下载119: 不规则焦点图广告代码演示下载120:3屏循环式立体焦点图代码下载20状态栏文字拉长的分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙1能让按钮发出声音的分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙19导航菜单下拉展开分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙18说明框的各种用法分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙17页面窗口的由小变分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙16网页的任意缩放分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙15直接调用计算机中分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙14用JS的方法使用列分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙13用JavaScript实现分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙12用Javascript实现分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙11地震效果的浏览器分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材∙10星星跟随鼠标分类:JS代码更新时间:09-05-16点击次数:0次推荐等级:★★★★我要发布素材。
网页两边悬浮窗广告代码
<html xmlns="/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>悬浮广告</title></head><body><div style="height:900px; display:block;"></div><div id="AdLayer1" style='position: absolute; ;z-index:1; left:100px; border:1px #DDD solid; width:36px; height:200px; background-color:#CCC;'></div><div id="AdLayer2" style='position: absolute; ;z-index:1; right:100px; border:1px #DDD solid; width:36px; height:200px; background-color:green;'></div><script type="text/javascript">// 页面初始化function initEcAd() {document.all.AdLayer1.style.posTop = 200;document.all.AdLayer1.style.visibility = 'visible'document.all.AdLayer2.style.posTop = 200;document.all.AdLayer2.style.visibility = 'visible'MoveLeftLayer('AdLayer1');MoveRightLayer('AdLayer2');}// 移动左面的广告层function MoveLeftLayer(layerName) {var x = 100;var y = 100;// 左侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval("document.all." + layerName + ".style.posTop = parseInt(y)");eval("document.all." + layerName + ".style.posLeft = x");setTimeout("MoveLeftLayer('AdLayer1');", 20);}// 移动右边的广告层function MoveRightLayer(layerName) {var x = 100;var y = 100;// 右侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval("document.all." + layerName + ".style.posTop = y");eval("document.all." + layerName + ".style.posRight = x");setTimeout("MoveRightLayer('AdLayer2');", 20);}initEcAd()</script> </body> </html>。
超简单无缝滚动漂浮广告代码属性
超简单⽆缝滚动漂浮⼴告代码属性实现功能:1、⽆缝滚动(左右上下)2、漂浮⼴告(包括在屏幕漂浮⼏次消失)两个事件onmouseover="this.stop()" ⿏标划过停⽌滚动onmouseout="this.start()" ⿏标离开继续滚动<marquee width="920" onmouseover="this.stop()" onmouseout="this.start()" scrollamount="20" behavior="scroll" align="absbottom"> @foreach (var item in Model.NewsItems_WebNotice){<u><a href="@Url.RouteUrl("NewsItem", new { SeName = item.SeName })">@Html.StrTruncation(item.Title, 10)</a></u>}</marquee>Marquee 属性列表:align设定<marquee>标签内容的对齐⽅式absbottom:绝对底部对齐(与g、p等字母的最下端对齐)absmiddle:绝对中央对齐baseline:底线对齐bottom:底部对齐(默认)left:左对齐middle:中间对齐right:右对齐texttop:顶线对齐top:顶部对齐behavior设定滚动的⽅式:alternate:表⽰在两端之间来回滚动。
scroll:表⽰由⼀端滚动到另⼀端,会重复。
slide:表⽰由⼀端滚动到另⼀端,不会重复scrollamount="5":设置滚动的速度direction设定活动字幕的滚动⽅向代码如下:<marquee direction="down">设定活动字幕的滚动⽅向direction="down":向下</marquee><marquee direction="left">设定活动字幕的滚动⽅向direction="left":向左</marquee><marquee direction="right">设定活动字幕的滚动⽅向direction="right":向右</marquee><marquee direction="up">设定活动字幕的滚动⽅向direction="up":向上</marquee>hspace设定活动字幕⾥所在的位置距离⽗容器⽔平边框的距离This controls the horizontal(⽔平)space around thedisplay box.代码如下:<table width="500"border="1" align="center" cellpadding="0"cellspacing="0"><tr><td><marquee hspace="100"bgcolor="#CCCCCC">hspace="100"</marquee></td></tr></table>loop设定滚动的次数,当loop=-1表⽰⼀直滚动下去,默认为-1Marquee标记⽤于在可⽤浏览区域中滚动⽂本。
常用网页漂浮广告代码
常用网页漂浮广告代码<body bgcolor="#F7F7F7"><!--图片漂浮广告代码开始--><div id="www_qpsh_com" style="position:absolute"><!--链接地址--><a href="" target="_blank"><!--图片地址--><img src="/images/logo.jpg" border="0"></a></div><script>var x = 50,y = 60var xin = true, yin = truevar step = 1var delay = 10var obj=document.getElementById("www_qpsh_com")function floatwww_qpsh_com() {var L=T=0//by var R= document.body.clientWidth-obj.offsetWidthvar B = document.body.clientHeight-obj.offsetHeightobj.style.left = x + document.body.scrollLeftobj.style.top = y + document.body.scrollTopx = x + step*(xin?1:-1)if (x < L) { xin = true; x = L}if (x > R){ xin = false; x = R}y = y + step*(yin?1:-1)if (y < T) { yin = true; y = T }if (y > B) { yin = false; y = B }}var itl= setInterval("floatwww_qpsh_com()", delay)obj.onmouseover=function(){clearInterval(itl)}obj.onmouseout=function(){itl=setInterval("floatwww_qpsh_com()", delay)}</script><!--图片漂浮广告代码结束--></body>THANKS !!!致力为企业和个人提供合同协议,策划案计划书,学习课件等等打造全网一站式需求欢迎您的下载,资料仅供参考。
网页两边悬浮窗广告代码
<html xmlns="/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>悬浮广告</title></head><body><div style="height:900px; display:block;"></div><div id="AdLayer1" style='position: absolute; ;z-index:1; left:100px; border:1px #DDD solid; width:36px; height:200px; background-color:#CCC;'></div><div id="AdLayer2" style='position: absolute; ;z-index:1; right:100px; border:1px #DDD solid; width:36px; height:200px; background-color:green;'></div><script type="text/javascript">// 页面初始化function initEcAd() {document.all.AdLayer1.style.posTop = 200;document.all.AdLayer1.style.visibility = 'visible'document.all.AdLayer2.style.posTop = 200;document.all.AdLayer2.style.visibility = 'visible'MoveLeftLayer('AdLayer1');MoveRightLayer('AdLayer2');}// 移动左面的广告层function MoveLeftLayer(layerName) {var x = 100;var y = 100;// 左侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval("document.all." + layerName + ".style.posTop = parseInt(y)");eval("document.all." + layerName + ".style.posLeft = x");setTimeout("MoveLeftLayer('AdLayer1');", 20);}// 移动右边的广告层function MoveRightLayer(layerName) {var x = 100;var y = 100;// 右侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval("document.all." + layerName + ".style.posTop = y");eval("document.all." + layerName + ".style.posRight = x");setTimeout("MoveRightLayer('AdLayer2');", 20);}initEcAd()</script> </body> </html>。
常用网页广告代码全集
25:分组相关的图片导航 26: 分组相关的图片导航 27:分组相关的图片轮换 28:列表式广告代码演示 代码 1 下载 代码 2 下载 演示下载 下载
29:杂志式幻灯广告代码 30:影院模式幻灯广告代 31:易趣产品幻灯广告代 32:两侧翻牌的广告代码 演示下载 33:div+css 显示对联带 关闭代码下载 37:TOP 排列幻灯广告代 码下载 41:随图片快速翻动幻灯 代码下载 45:很不错的漂浮广告代 码下载 码演示下载 码演示下载 演示下载
66:网易顶部展出的大幅 67:包含 flash 的通栏滚 广告下载 动 banner 下载
70:flash+xml 图片轮换 71:调用灵活的 flash 焦 效果下载 点图轮换下载
73:可翻阅上一条下一条 滚动下载 77:FLASH+XML 迅雷影片 广告特效下载 81:四屏 flash 图片轮换 代码下载 85:沪江英语网 3 图弹性 广告下载 89:迅雷网七屏 flash 广 告轮换下载 93:flash 无限图片展示 广告下载
117:广告自动轮播代码演 118 :3 屏 Flash 竖焦点图 119: 不规则焦点图广告 示下载 广告演示 下鼠标移动提示的广告 码下载 代码下载
49:破 SP2 弹窗 24 小时弹 50 一次下载 53:关闭弹出两窗口的代 码下载 代码下载 动广告下载 下载 56:左边底部悬浮代码下 载 60:新浪 FLASH 切换广告 下载 64:仿 QQ 消息弹出广告效 果下载 68:MiniTabbedPages 雅 虎 TAB 下载 72: 附带缩略图的 JS 图片 轮换下载
105:3d 图片墙 flash+xml 106:360 度旋转展示 下载 109:四屏切换 JS 广告代 码下载 flash+xml 下载 110:JavaScript 图片切 换效果 下载
JS实现悬浮移动窗口(悬浮广告)的特效
JS实现悬浮移动窗⼝(悬浮⼴告)的特效js⽅法:复制代码代码如下:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "/TR/html4/loose.dtd"><html><head><title> New Document </title><meta name="Generator" content="EditPlus"><meta name="Author" content=""><meta name="Keywords" content=""><meta name="Description" content=""><script type="text/javascript">window.onload=function(){//写⼊var oneInner = document.createElement("div");oneInner.setAttribute("style","background:#663398;position:absolute;width:100px;height:100px;border:solid 3px #2F74A7;cursor:pointer;");var oneButton = document.createElement("input");oneButton.setAttribute("type","button");oneButton.setAttribute("value","x");if (oneButton.style.cssFloat){oneButton.style.cssFloat="right"}else{oneButton.style.styleFloat="right"}oneInner.appendChild(oneButton);document.body.appendChild(oneInner);//定时器var a1a = setInterval(moves,100);//函数var x = 10;var y = 10;function moves(){var tops = oneInner.offsetTopvar lefts = oneInner.offsetLeftif (lefts>=document.documentElement.clientWidth-oneInner.offsetWidth||lefts<=0){x=-x}if (tops>=document.documentElement.clientHeight-oneInner.offsetHeight||tops<=0){y=-y}tops+=y;lefts+=x;oneInner.style.top=tops+"px"oneInner.style.left=lefts+"px"}//悬停停⽌oneInner.onmouseover=function(){clearInterval(a1a);}//放⼿继续运动oneInner.onmouseout=function(){a1a =setInterval(moves,100);}//删除oneButton.onclick=function(){document.body.removeChild(oneInner);}}</script></head><body></body></html>jquery⽅法:复制代码代码如下:<!DOCTYPE html><html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script type="text/javascript" src="https:///workspace/js/jquery-1.7.min.js"></script><script>$(function(){//写⼊div$("<div/>",{id:"moveWindow"}).css({width:"200px",height:"200px",border:"solid 3px#2F74A7",background:"#663398",position:"absolute",cursor:"pointer"}).appendTo("body");//写⼊关闭按钮$("<div/>",{id:"removeMW"}).css({width:"20px",height:"20px",background:"red",float:"right"}).appendTo("#moveWindow"); //定时器var move = setInterval(moves,100);var x= 10;var y= 10;function moves (){var mw = $("#moveWindow").offset();var lefts =mw.left;var tops = mw.top;if (lefts>=$(window).width()-$("#moveWindow").width()||lefts<=0){x=-x}if (tops>=$(window).height()-$("#moveWindow").height()||tops<=0){y=-y}lefts+=x;tops+=y;$("#moveWindow").offset({top:tops,left:lefts});}//悬停停⽌运动$("#moveWindow").mouseover(function(){clearInterval(move);});//移开⿏标后继续运动$("#moveWindow").mouseout(function(){move = setInterval(moves,100);});//点击按钮关闭$("#removeMW").click(function(){$("#moveWindow").remove();});})</script></head><body></body></html>基本思路:1.页⾯加载完成之后向页⾯插⼊窗⼝,之后向窗⼝插⼊关闭按钮2.使⽤setInterval()函数触发moves()函数开始动画3.moves函数:⾸先获取当前窗⼝位置,之后随时间使窗⼝位移,每当位移到游览器边缘时反向运动4.添加其他事件:⿏标悬停停⽌运动,⿏标离开继续运动,点击按钮关闭窗⼝ps:不建议使⽤这个特效,影响⽤户体验希望对你有所帮助!^_^!~~。
浮动广告代码
注:浮动广告代码:<SCRIPT language=JavaScript>self.onError=null;currentX = currentY = 0;whichIt = null;lastScrollX = 0; lastScrollY = 0;NS = (yers) ? 1 : 0;IE = (document.all) ? 1: 0;function heartBeat() {if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; } if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }if(diffY != lastScrollY) {percent = .1 * (diffY - lastScrollY);if(percent > 0) percent = Math.ceil(percent);else percent = Math.floor(percent);if(IE) document.all.sohususpend.style.pixelTop += percent;if(NS) document.sohususpend.top += percent;lastScrollY = lastScrollY + percent;}if(diffX != lastScrollX) {percent = .1 * (diffX - lastScrollX);if(percent > 0) percent = Math.ceil(percent);else percent = Math.floor(percent);if(IE) document.all.sohususpend.style.pixelLeft += percent;if(NS) document.sohususpend.left += percent;lastScrollX = lastScrollX + percent;}}function checkFocus(x,y) {stalkerx = document.sohususpend.pageX;stalkery = document.sohususpend.pageY;stalkerwidth = document.sohususpend.clip.width;stalkerheight = document.sohususpend.clip.height;if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) return true;else return false;}function grabIt(e) {if(IE) {whichIt = event.srcElement;while (whichIt.id.indexOf("sohususpend") == -1) {whichIt = whichIt.parentElement;if (whichIt == null) { return true; }}whichIt.style.pixelLeft = whichIt.offsetLeft;whichIt.style.pixelTop = whichIt.offsetTop;currentX = (event.clientX + document.body.scrollLeft);currentY = (event.clientY + document.body.scrollTop);} else {window.captureEvents(Event.MOUSEDOWN);if(checkFocus (e.pageX,e.pageY)) {whichIt = document.sohususpend;StalkerTouchedX = e.pageX-document.sohususpend.pageX;StalkerTouchedY = e.pageY-document.sohususpend.pageY;}}return true;}function moveIt(e) {if (whichIt == null) { return false; }if(IE) {newX = (event.clientX + document.body.scrollLeft);newY = (event.clientY + document.body.scrollTop);distanceX = (newX - currentX); distanceY = (newY - currentY);currentX = newX; currentY = newY;whichIt.style.pixelLeft += distanceX;whichIt.style.pixelTop += distanceY;if(whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;if(whichIt.style.pixelLeft > document.body.offsetWidth -document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;if(whichIt.style.pixelTop > document.body.offsetHeight +document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;event.returnValue = false;} else {whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);if(whichIt.left < 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;if(whichIt.top < 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;if( (whichIt.left + whichIt.clip.width) >=(window.innerWidth+self.pageXOffset-17)) whichIt.left =((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;if( (whichIt.top + whichIt.clip.height) >=(window.innerHeight+self.pageYOffset-17)) whichIt.top =((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;return false;}return false;}function dropIt() {whichIt = null;if(NS) window.releaseEvents (Event.MOUSEDOWN);return true;}if(NS) {window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN); window.onmousedown = grabIt;window.onmousemove = moveIt;window.onmouseup = dropIt;}if(IE) {document.onmousedown = grabIt;document.onmousemove = moveIt;document.onmouseup = dropIt;}if(NS || IE) action = window.setInterval("heartBeat()",1);</SCRIPT>。
网页上漂浮的客服代码(漂浮框架兼容各大浏览器)
网页上漂浮的客服代码(漂浮框架兼容各大浏览器)第一篇:网页上漂浮的客服代码(漂浮框架兼容各大浏览器) 常见网页上的漂浮客服窗口,是一个漂浮框架,各位可以拿去用。
在chrome、ie、firefox下测试正常。
以下是部分代码(可点击演示查看或直接下载源代码):.kfoutbox{position:absolute;z-index:10000;right:5px;margin:0px;width:80px;height:150px;back ground:#ff0000;}这里是网页的内容区第二篇:《漂浮》四年级上美术教案《漂浮》四年级上美术教案漂浮教学内容与目标、显性内容与目标应知:通过本学习,学生初步探索有关浮力的知识,并能根据身边的废旧材料进行有创意的设计。
应会:结合绘画、粘贴、插接等不同造型手法,以及漂浮的科学道理,利用生活中的废旧物品实现自己的艺术创想。
2、隐性内容与目标通过本学习,培养学生将艺术创造与科学研究完美结合的意识,以及发现问题、分析问题、解决问题的能力,激发他们热爱生活、关注生活的美好情感。
教学重点:启发学生探究简单的浮力知识,并结合身边废旧物品进行有创意的设计与制作。
教学难点:在制作漂浮物时,创新地使用材料,制作方法精细。
教学过程:一、游戏导人游戏l:发给学生每人一支吸管,提出游戏要求:你能想到几种令吸管在水中漂浮起来的方法?游戏2:抢答——如果给你一把吸管,让它们漂浮在水面上.设想一下都可能有哪些不同的造型?二、思考反馈吸管为什么可以漂浮?铁很重,为什么轮船却能漂浮在海上?三、信息交流组织学生进行信息交流。
哪位科学家最早发现了浮力?你知道有哪些关于浮力的小故事吗?四、合作探究组织学生分组探究:在我们身边,还有哪些材料可以漂浮?看一看:书中同学作品给了你哪些启发?试一试:运用折、剪、卷、组合等不同手段,你能用手边的材料组织什么样的漂浮物的造型?讲一讲:你能设想一下它的功能及装饰吗?五、探索实践提出作业要求:利用身边的废旧材料,制作一个能浮在水面上的新颖美观的玩具。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
常用网页漂浮广告代码
代码:
1.
<body bgcolor="#F7F7F7">
<!--图片漂浮广告代码开始-->
<div id="www_qpsh_com" style="position:absolute"> <!--链接地址--><a href="链接地址"
target="_blank">
<!--图片地址--><img src="图片地址" border="0"> </a>
</div>
<script>
var x = 50,y = 60
var xin = true, yin = true
var step = 1
var delay = 10
var obj=document.getElementById("www_qpsh_com") function floatwww_qpsh_com() {
var L=T=0
var R= document.body.clientWidth-obj.offsetWidth
var B = document.body.clientHeight-obj.offsetHeight obj.style.left = x + document.body.scrollLeft
obj.style.top = y + document.body.scrollTop
x = x + step*(xin?1:-1)
if (x < L) { xin = true; x = L}
if (x > R){ xin = false; x = R}
y = y + step*(yin?1:-1)
if (y < T) { yin = true; y = T }
if (y > B) { yin = false; y = B }
}
var itl= setInterval("floatwww_qpsh_com()", delay)
obj.onmouseover=function(){clearInterval(itl)}
obj.onmouseout=function(){itl=setInterval("floatwww_qpsh _com()", delay)}
</script>
<!--图片漂浮广告代码结束-->
</body>
2.
<body bgcolor="#F7F7F7">
<!--图片漂浮广告代码开始-->
<div id="www_qpsh_com" style="position:absolute"> <!--链接地址--><a href="链接地址"
target="_blank">
<!--图片地址--><img src="图片地址" border="0"> </a>
</div>
<script>
var x = 50,y = 60
var xin = true, yin = true
var step = 1
var delay = 10
var obj=document.getElementById("www_qpsh_com") function floatwww_qpsh_com() {
var L=T=0
var R= document.body.clientWidth-obj.offsetWidth
var B = document.body.clientHeight-obj.offsetHeight obj.style.left = x + document.body.scrollLeft
obj.style.top = y + document.body.scrollTop
x = x + step*(xin?1:-1)
if (x < L) { xin = true; x = L}
if (x > R){ xin = false; x = R}
y = y + step*(yin?1:-1)
if (y < T) { yin = true; y = T }
if (y > B) { yin = false; y = B }
}
var itl= setInterval("floatwww_qpsh_com()", delay)
obj.onmouseover=function(){clearInterval(itl)}
obj.onmouseout=function(){itl=setInterval("floatwww_qpsh _com()", delay)}
</script>
<!--图片漂浮广告代码结束-->
</body>。