Keep track of some collected advertising effects with this post. Want to give some support to friends who need it. I also hope that my friends have not recorded the form of advertising also give a reply. Make this paste more perfect, also let more friends to share.
1. Turn screen effect
Turn screen effect
Copy Code code as follows:
<body>
<div style= "height:85px" >
<script language= ' JavaScript ' >
Document.ns = Navigator.appname = = "Microsoft Internet Explorer";
function Showstr (str,textwidth,num)
{
if (!DOCUMENT.NS)
{
document.write (str[0]+ ' <br> ')
}
Else
{
var wrt= "";
wrt+= ' <table border=0 cellspacing=0 cellpadding=0> ';
wrt+= ' <tr><td> ';
wrt+= ' <div id= ' icefable1 ' +num+ ' ">";
wrt+= ' <table width= ' +textwidth+ ' border=0 cellspacing=0 ';
for (var i in str)
{
wrt+= ' <tr><td height=20> ' +str[i]+ ' </td></tr> ';
} scroll_num=i;
wrt+= ' </table> ';
wrt+= ' </div> ';
wrt+= ' <div id= ' icefable2 ' +num+ ' style= ' Position:absolute;z-index:1;visibility:hidden ' ></div> ';
wrt+= ' </td></tr> ';
wrt+= ' </table> ';
document.write (WRT);
}
}
function Init_srolltext (num) {countnum=0;eval (' stopscroll ' +num+ ' =false; ');
Eval (' Icefable1 ' +num+ '. scrolltop=0; ');
rotatenum=0;
Eval (' Icefable1 ' +num+ '. style.width=0; ');
Eval (' Icefable1 ' +num+ '. style.height=marqueesheight; ');
Eval (' Icefable1 ' +num+ '. style.overflowx= "visible"; ");
Eval (' Icefable1 ' +num+ '. style.overflowy= "hidden"; ");
Eval (' Icefable1 ' +num+ '. nowrap=true; ');
Eval (' Icefable1 ' +num+ '. Onmouseover=new Function ("Stopscroll=true");
Eval (' Icefable1 ' +num+ '. Onmouseout=new Function ("Stopscroll=false");
Eval (' pretop ' +num+ ' = 0; ');
Eval (' currenttop ' +num+ ' = 0; '); Eval (' stoptime ' +num+ ' = 0; ');
Eval (' Icefable2 ' +num+ '. innerhtml= '; ');
Eval (' Icefable2 ' +num+ '. Innerhtml+=icefable1 ' +num+ '. InnerHTML; ');
Eval (' Icefable1 ' +num+ '. Innerhtml=icefable2 ' +num+ '. Innerhtml+icefable2 ' +num+ '; innerHTML; ');
Eval (' SetInterval ("Scrollup ' +num+ ' ()", 40); ');
}
function ScrollUp1 ()
{
if (stopscroll1==true) return;
Currenttop1+=1;
if (currenttop1==marqueesheight+1)
{
Stoptime1+=1;
Currenttop1-=1;
if (stoptime1==scrolllen*marqueesheight)
{
currenttop1=0;
stoptime1=0;
}
}
Else
{
Pretop1=icefable11.scrolltop;
Icefable11.scrolltop+=1;
if (icefable11.scrolltop==scrolllen*marqueesheight+1)
{
pretop1=0;
currenttop1=0;
stoptime1=0;
Icefable11.scrolltop=0;
}}}
var strarray1=new Array (); strarray1[0]= ' <a href=http://www.dearbook.com.cn/book/searchbook.aspx?keyword= Computer Fashion Application Series Target=_blank></a> <a href =http://www.dearbook.com.cn/book/searchbook.aspx?keyword= examples of target=_blank></a> <a href=http://www.dearbook.com.cn/book/searchbook.aspx? Keyword= Enterprise-Class development case target=_blank></a> <a href=http://www.dearbook.com.cn/subject/top50/target=_blank></a> '; strarray1[1]= ' <a href=http://www.dearbook.com.cn/2005/c++/target=_ Blank></a> <a href=http:// Www.dearbook.com.cn/subject/VBzh/target=_blank> </A> <a href=http://www.dearbook.com.cn/book/searchbook.aspx?keyword= Development FAQ &searchtype=0&corder= 3&page=1&log=0 target=_blank></a> <a href=http://www.dearbook.com.cn/book/searchbook.aspx?keyword= Foreign Computer Science textbook series Target=_blank></a> <a href=http://www.dearbook.com.cn/subject/c+ +/index.htm target=_blank></a> '; var Scrolllen=strarray1.length;marqueesheight=82;showstr (strarray1,580,1); Init_srolltext (1);</script>
</div>
</body>
2. Advertising Wheel Display
Show in turn
Copy Code code as follows:
<SCRIPT>
var elady_tp=new Array ();
var elady_tplink1=new Array ();
var elady_tptext=new Array ();
var adnumvii=0;
elady_tp[0]= "Yun_qi_img/1.gif"
elady_tp[1]= "Yun_qi_img/3.gif"
elady_tp[2]= "Yun_qi_img/2.gif"
var elady_cimage=new Array ();
for (i=1;i<=5;i++) {elady_cimage[i]=new Image ();
Elady_cimage[i].src=elady_tp[i];
}
function Set_coelady1 () {if (document.all)
{Elady_tprotator1.filters.revealtrans.transition=math.floor (Math.random () *23);
Elady_tprotator1.filters.revealTrans.apply (); }
}
function Play_coelady1 ()
{if (document.all) Elady_tprotator1.filters.revealTrans.play ()
}function next_elady1 () {if (adnumvii<elady_tp.length-1) adnumvii++;
else adnumvii=0;
Set_coelady1 ();
DOCUMENT.IMAGES.ELADY_TPROTATOR1.SRC=ELADY_TP[ADNUMVII];
Play_coelady1 ();
Thetimer=settimeout ("Next_elady1 ()", 4000);}
function Linkurl1 () {JUMPURL1=ELADY_TPLINK1[ADNUMVII];
jumptarget1= ' _blank ';
if (jumpUrl1!= ') {if (JumpTarget1!= ') window.open (JUMPURL1,JUMPTARGET1);
else LOCATION.HREF=JUMPURL1;
}}
function LISTMSG1 ()
{STATUS=ELADY_TPLINK1[ADNUMVII];
Document.returnvalue = true;
}
</SCRIPT>
<body>
</a>"
</body>
3. Mobile Advertising
Mobile Advertising
Copy Code code as follows:
<body>
<marquee onmouseover=this.stop () Onmouseout=this.start () scrollamount=5 behavior=alternate>
<table cellspacing=0 cellpadding=2 width= "100%" border=0>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</marquee>
</body>
4. Mobile Advertising Box
Mobile ads
Copy Code code as follows:
<div id= "img" style= "LEFT:27PX; Visibility=hidden; Position:absolute; top:1115px ">
<a href= "www.eyou.com" target= "_blank" >
</a>
</div>
<script language= "JavaScript" >
<!--Begin
var xpos = 20;
var yPos = document.body.clientHeight;
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;
Img.style.top = YPos;
function Changepos () {
width = document.body.clientWidth;
Height = document.body.clientHeight;
Hoffset = Img.offsetheight;
Woffset = Img.offsetwidth;
Img.style.left = xpos + document.body.scrollLeft;
Img.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 () {
img.style.visibility = "visible";
Interval = setinterval (' Changepos () ', delay);
}
Start ();
End-->
</script>
5. Left and right bottom advertisement
Copy Code code as follows:
<script type= "Text/javascript" language= "JavaScript" >
var mmyeeadshow = 3; 1 for the left, 2 for the right, and the other for the side display.
var mmyeeadwidth = 300; Advertising width
var mmyeeadheight = 200; Advertising height
Floating on the left
var adleftcontent= "<div><iframe id= ' iframyee ' bordercolor= ' #000000 ' frameborder= ' 0 ' hspace= ' 0 ' marginheight = ' 0 ' marginwidth= ' 0 ' scrolling= ' no ' src= ' http://a311300.cnblogs.com ' width= ' "+mmyeeadwidth+" ' height= ' "+ mmyeeadheight+ "' ></iframe></div>";
Right float
var adrightcontent = "<div><iframe id=iframyee frameborder=0 marginwidth=0 marginheight=0 ' # 000000 ' hspace= ' 0 ' scrolling=no src= ' http://a311300.cnblogs.com ' width= ' "+mmyeeadwidth+" ' height= ' "+mmyeeadheight+" ' ></iframe></div> '
Float according to the bottom of the page set box value, in order to beautiful please do not modify the secondary parameters
var margintop = 10
The distance of the floating border
var marginleft = 5
var navuseragent = navigator.useragent
function Load ()
{
Judge ();
Move ();
}
function Move () {
Judge ();
SetTimeout ("Move ();", 80)
}
Function judge () {
if (Navuseragent.indexof ("Firefox") >= 0 | | | navuseragent.indexof ("Opera") >= 0) {
if (mmyeeadshow!= "2") {
document.getElementById ("Adleftfloat"). Style.top = (document.body.scrolltop?document.body.scrolltop: DOCUMENT.DOCUMENTELEMENT.SCROLLTOP) + ((Document.body.clientHeight > Document.documentElement.clientHeight)? Document.documentElement.clientHeight:document.body.clientHeight)-(mmyeeadheight)-margintop + ' px ';
}
if (mmyeeadshow!= "1") {
document.getElementById ("Adrightfloat"). Style.top = (document.body.scrolltop?document.body.scrolltop: DOCUMENT.DOCUMENTELEMENT.SCROLLTOP) + ((Document.body.clientHeight > Document.documentElement.clientHeight)? Document.documentElement.clientHeight:document.body.clientHeight)-(mmyeeadheight)-margintop + ' px ';
document.getElementById ("Adrightfloat"). Style.left = (Document.body.clientWidth > document.documentElement.clientWidth)? document.body.clientWidth:document.documentElement.clientWidth)- Mmyeeadwidth-marginleft + ' px ';
}
}
else{
if (mmyeeadshow!= "2") {
document.getElementById ("Adleftfloat"). Style.top = (document.body.scrolltop?document.body.scrolltop: DOCUMENT.DOCUMENTELEMENT.SCROLLTOP) + ((document.documentElement.clientHeight = 0)? document.body.clientHeight: Document.documentElement.clientHeight)-(mmyeeadheight)-margintop + ' px ';
}
if (mmyeeadshow!= "1") {
document.getElementById ("Adrightfloat"). Style.top = (document.body.scrolltop?document.body.scrolltop: DOCUMENT.DOCUMENTELEMENT.SCROLLTOP) + ((document.documentElement.clientHeight = 0)? document.body.clientHeight: Document.documentElement.clientHeight)-(mmyeeadheight)-margintop + ' px ';
document.getElementById ("Adrightfloat"). Style.left = ((Document.documentElement.clientWidth = = 0)? Document.body.clientWidth:document.documentElement.clientWidth)-mmyeeadwidth-marginleft + ' px ';
}
}
if (mmyeeadshow!= "2") {
document.getElementById ("Adleftfloat"). Style.left = marginleft + ' px ';
}
}
if (mmyeeadshow!= "2") {
document.write ("<div id=\" adleftfloat\ "style=\" position:absolute;width: "+ mmyeeadwidth +"; \ "><table border=0 cellpadding=0 cellspacing=0><tr><td> "+adleftcontent+" </td></tr></table ></div> ");
}
if (mmyeeadshow!= "1") {
document.write ("<div id=\" adrightfloat\ "style=\" position:absolute;width: "+ mmyeeadwidth +"; \ "><table border=0 cellpadding=0 cellspacing=0><tr><td> "+adrightcontent+" </td></tr></table ></div> ");
}
Load ();
</script>
6. Floating advertising on the left
Copy Code code as follows:
<script event= "onload" for= "window" language= "JavaScript" >
Init_ad_left (),//After loading the page, call function Init_ad_left ().
</script>
<script language= "JavaScript" >
<!--
function Init_ad_left () {
Document.all.AdLeftLayer.style.posTop =-200;
Set the OnLoad event excitation, the ad layer relative to the fixed y direction position
document.all.AdLeftLayer.style.visibility = ' visible '//Set layer to visible
Moveleftlayer (' Adleftlayer ');//Call Function Movelayer ()
}
function Moveleftlayer (layername)
{
var x = 20;//Floating ad layer fixed to the position of the browser in the x direction
var y = 200;//floating ad layer fixed to the Y-direction position of the browser
var diff = (document.documentElement.scrollTop + y-document.all.adleftlayer.style.postop) *.90;
var y = document.documentElement.scrollTop + Y-diff;
Eval ("document.all." + LayerName + ". Style.postop = y");
Eval ("document.all." + LayerName + ". Style.posright = x");/mobile AD layer
SetTimeout ("Moveleftlayer (' Adleftlayer ');", 0);//Set 20 milliseconds before calling function Movelayer ()
}
-->
</script>
<div id= "Adleftlayer" style= ' Position:absolute; width:100px; height:200px; z-index:20;visibility:visible; left:20px; top:100px ' >
Add the content you want to place
<!--embed sub-page-->
<iframe id= "Iframyee11" allowtransparency= ' true ' bordercolor= ' #000000 ' frameborder= ' 0 ' height= ' hspace= ' 0 ' marginheight= "0" marginwidth= "0" scrolling= "no" src= ' detail.aspx ' width= ' ></iframe>
DSFSFQQQ qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq QQQQQQQQ
QQQQQ QQQQQQQQ QQQQQQQQ QQQQQQQ
</div>
7. Floating ads on the right
Copy Code code as follows:
<script event= "onload" for= "window" language= "JavaScript" >
Init_ad_right ()//load page, call function Init_ad_right ()
</script>
<script language= "JavaScript" >
<!--
function Init_ad_right ()
{
Document.all.AdRightLayer.style.posTop =-300; Set the OnLoad event excitation, the ad layer relative to the fixed y direction position
document.all.AdRightLayer.style.visibility = ' visible '; Set layer to visible
Moverightlayer (' Adrightlayer '); Call Function Moverightlayer ()
}
function Moverightlayer (layername)
{
var x = 20; Floating ad layer fixed to the position of the browser in x direction
var y = 200;//floating ad layer fixed to the Y-direction position of the browser
var diff = (document.documentElement.scrollTop + y-document.all.adrightlayer.style.postop) *.90;
var y = document.documentElement.scrollTop + Y-diff;
Eval ("document.all." + LayerName + ". Style.postop = y");
Eval ("document.all." + LayerName + ". Style.posright = x");/mobile AD layer
SetTimeout ("Moverightlayer (' Adrightlayer ');", 0);//Set 20 milliseconds before calling function Moverightlayer ()
}
-->
</script>
<div id= "Adrightlayer" style= ' Position:absolute; width:100px; height:200px; Z-index:20;visibility:hidden; right:30px; top:600px ' >
Add the content you want to place
<!--embed sub-page-->
<iframe id= "Iframyee2" allowtransparency= ' true ' bordercolor= ' #000000 ' frameborder= ' 0 ' height= ' hspace= ' 0 ' marginheight= "0" marginwidth= "0" scrolling= "no" src= ' detail.aspx ' width= ' ></iframe>
Hhhhhh hhhhhh hh hhhhhh hhhhhh hhhhhh h hhhhhh hhhhhh hhhhhh hhhhhh hh
</div>
8. Floating advertising
The following layers are invariant and the Init_ad_left () and Init_ad_right () methods are loaded in the event= "onload"
Floating ads around
Copy Code code as follows:
<script event= "onload" for= "window" language= "JavaScript" >
Init_ad_left ()//load page, call function Init_ad_left ()
Init_ad_right ()//load page, call function Init_ad_right ()
</script>
9.falsh Advertising Wheel display
Flash Advertising Wheel Display demo
Thank you for your friend's position to provide this ad presentation style
Interested friends can also be packaged into custom controls in asp.net. This is more convenient to use.