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;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)il(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);
</script>


2.左栏浮动广告

QUOTE:
<script language=javascript>var specialcode="<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><table border='1' width='150' id='table1' bordercolor='#2E6287' height='500'><tr><td>广告内容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)pe
网页il(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+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" >广告内容</div>
<script LANGUAGE="JavaScript">
var xPos = 20;
var yPos = 10;
img.style.left= xPos;
p = 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;
p = 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 cellSpacing=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 cellSpacing=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)il(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollX=lastScrollX+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)il(percent);else percent=Math.floor(percent);document.all.searchspe2.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat1()",1);</script>


8.qq好友上线广告代码

QUOTE:

<DIV id=eMeng
style="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; HEIG
HT: 115px; BACKGROUND-COLOR: #c9d3f3">
<TABLE
cellSpacing=0 cellPadding=0 width="100%" bgColor=#cfdef4 border=0>
<TBODY>
<TR>
<TD

width=30 height=24> </TD>
<TD

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; MARGI
N-RIGHT: 4px"
    onclick=closeDiv()>×</SPAN></TD></TR>
<TR>
<TD

colSpan=3 height=90><DIV
    >
    <div align="left"> <span >
    <FONT
    color=#FF0000>仿造qq好友上线<br>
    <center> </center>
    </FONT></span></div>
    </DIV></td></tr></table>
    <SCRIPT language=JavaScript>
load = getMsg;
size = resizeDiv;
r = function(){}
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
try{
divTop = ElementById("eMeng").p,10)
divLeft = ElementById("eMeng").style.left,10)
divHeight = ElementById("eMeng").offsetHeight,10)
divWidth = ElementById("eMeng").offsetWidth,10)
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
ElementById("eMeng").p = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeight
ElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth
ElementById("eMeng").style.visibility="visible"
objTimer = window.setInterval("moveDiv()",10)
}
catch(e){}
}

function resizeDiv()
{
try{
divHeight = ElementById("eMeng").offsetHeight,10)
divWidth = ElementById("eMeng").offsetWidth,10)
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
ElementById("eMeng").p = docHeight - divHeight + parseInt(document.body.scrollTop,10)
ElementById("eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)
}
catch(e){}
}

function moveDiv()
{
try
{
if(ElementById("eMeng").p,10) <= (docHeight - divHeight +
parseInt(document.body.scrollTop,10)))
{
window.clearInterval(objTimer)
objTimer = window.setInterval("resizeDiv()",1)
}
divTop = ElementById("eMeng").p,10)
ElementById("eMeng").p = divTop - 1
}
catch(e){}
}
function closeDiv()
{
ElementById('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="www.jiathis/share/" class="jiathis button jtico jtico_more" target="_blank">更多</a> </div> <script type="text/javascript" src="www.jiathis/code/jia.js" charset="utf-8"></script> 
 
是不是觉得图标太少了?
来分析下这段JS。
<a title="这里是鼠标放在图标上显示出的文字" class="jiathis_button_这里写入你要的添加的网址的ID"></a>
你想在添加一条,那么就按照上面的样式多复制进去一条哦。
具体的各大网站ID如下:
<a href="javascript:;" class="jiathis_button_tsina"></a>
 <a href="javascript:;" class="jiathis_button_baidu"></a> 
<a href="javascript:;" class="jiathis_button_115"></a> 
<a href="javascript:;" class="jiathis_button_114la"></a> 
<a href="javascript:;" class="jiathis_button_douban"></a> 
<a href="javascript:;" class="jiathis_button_kaixin001"></a> 
<a href="javascript:;" class="jiathis_button_renren"></a> 
<a href="javascript:;" class="jiathis_button_buzz"></a> 
<a href="javascript:;" class="jiathis_button_fb"></a> 
<a href="javascript:;" class="jiathis_button_twitter"></a> 
<a href="javascript:;" class="jiathis_button_taobao"></a> 
<a href="javascript:;" class="jiathis_button_email"></a> 
 
10. 第一种方法:做一个网页解决问题
  如果只是因为浏览者改变了浏览器的设置,或者因为浏览器不兼容,使自己精心制作的网页变得"面目全非",那多令人沮丧!下面我们以网页爱好者的常用工具Dreamweaver(以
下简称DW)为例,列出几个网页制作初学者较常见的网页布局问题以及解决方法,希望对初学者们有所帮助。
  一、消除任意缩放浏览器窗口对网页的影响 内容来自站长资讯网(www.chinahtml)
  一番辛苦做出来的网页,在全屏状态下浏览一切正常。但在改变浏览窗口大小之后,网页就变得"不堪入目"了,这是个很值得注意的问题。
  问题的根源还得从网页的布局说起,在DW中,网页内容的定位一般是通过表格来实现的,解决表格的问题也就成功了大半。内容来自站长资讯网(www.chinahtml)

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。