所属分类:HTML网页,JS语言与代码
将var book1= 后面的代码改为你的广告代码即可。
[code]<script>
{
var book1="<iframe style=\"width:298px;height:245px; padding:0;\" allowTransparency=\"yes\" frameborder=\"0\" scrolling=\"no\" src=\"http://resource.elong.com/webunion/searchboxjs/index.htm?cId=4000350&hcity=%u5317%u4EAC&from=bjs&to=sha&case=0_blue_273X220\"></iframe>"
var book2="<iframe style=\"width:298px;height:245px; padding:0;\" allowTransparency=\"yes\" frameborder=\"0\" scrolling=\"no\" src=\"http://resource.elong.com/webunion/searchboxjs/index.htm?cId=4000350&hcity=%u5317%u4EAC&from=bjs&to=sha&case=0_blue_273X220\"></iframe>"
var book3="<iframe id=\"f\" width=\"250px\" height=\"250px\" src= \"http://info.lm.tv.sohu.com/cwzk/0000000b2d565b3cda0de9cc62a4465e862198cccf6/14581.do\" frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" allowtransparency=\"yes\" scrolling=\"NO\"> </iframe>"
var book4="<iframe id=\"f\" width=\"250px\" height=\"350px\" src= \"http://info.lm.tv.sohu.com/cgdxw/0000000b46796f717986adf0174e9f5c4cba6fd3d4y/14581.do\" frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" allowtransparency=\"yes\" scrolling=\"NO\"> </iframe>"
var book5="<iframe src=\"http://rcm-cn.amazon-adsystem.com/e/cm?t=a3guo-23&o=28&p=12&l=ur1&category=sha&banner=10TMH85P9VGGH48B5WG2&f=ifr\" width=\"300\" height=\"250\" scrolling=\"no\" border=\"0\" marginwidth=\"0\" style=\"border:none;\" frameborder=\"0\"></iframe>"
var book6="<iframe src=\"http://rcm-cn.amazon-adsystem.com/e/cm?t=a3guo-23&o=28&p=12&l=ur1&category=automotive&banner=1S3Z319Y3EJB5B5XMB02&f=ifr\" width=\"300\" height=\"250\" scrolling=\"no\" border=\"0\" marginwidth=\"0\" style=\"border:none;\" frameborder=\"0\"></iframe>"
var book7="<iframe src=\"http://rcm-cn.amazon-adsystem.com/e/cm?t=a3guo-23&o=28&p=12&l=ur1&category=automotive&banner=1696FR0WC1T9SYG8NQR2&f=ifr\" width=\"300\" height=\"250\" scrolling=\"no\" border=\"0\" marginwidth=\"0\" style=\"border:none;\" frameborder=\"0\"></iframe>"
var book8="<iframe id=\"f\" width=\"260px\" height=\"250px\" src= \"http://info.lm.tv.sohu.com/csp/0000000b345d91b50a44ab29b2d44b6fa8550606sk5/14581.do\" frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" allowtransparency=\"yes\" scrolling=\"NO\"> </iframe>"
var book10="<iframe id=\"f\" width=\"250px\" height=\"350px\" src= \"http://info.lm.tv.sohu.com/c/0000000b46796f717986adf0ee543d1a98425795d4y/14581.do\" frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" allowtransparency=\"yes\" scrolling=\"NO\"> </iframe>"
var book=Math.round(Math.random()*9)
if (book==0) book=book1
else if (book==1) book=book2
else if (book==2) book=book3
else if (book==3) book=book4
else if (book==4) book=book5
else if (book==5) book=book6
else if (book==6) book=book7
else if (book==7) book=book8
else if (book==8) book=book9
else book=book10
document.writeln(book)
}
</script>[/code]
[code]<script>
{
var book1="<iframe style=\"width:298px;height:245px; padding:0;\" allowTransparency=\"yes\" frameborder=\"0\" scrolling=\"no\" src=\"http://resource.elong.com/webunion/searchboxjs/index.htm?cId=4000350&hcity=%u5317%u4EAC&from=bjs&to=sha&case=0_blue_273X220\"></iframe>"
var book2="<iframe style=\"width:298px;height:245px; padding:0;\" allowTransparency=\"yes\" frameborder=\"0\" scrolling=\"no\" src=\"http://resource.elong.com/webunion/searchboxjs/index.htm?cId=4000350&hcity=%u5317%u4EAC&from=bjs&to=sha&case=0_blue_273X220\"></iframe>"
var book3="<iframe id=\"f\" width=\"250px\" height=\"250px\" src= \"http://info.lm.tv.sohu.com/cwzk/0000000b2d565b3cda0de9cc62a4465e862198cccf6/14581.do\" frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" allowtransparency=\"yes\" scrolling=\"NO\"> </iframe>"
var book4="<iframe id=\"f\" width=\"250px\" height=\"350px\" src= \"http://info.lm.tv.sohu.com/cgdxw/0000000b46796f717986adf0174e9f5c4cba6fd3d4y/14581.do\" frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" allowtransparency=\"yes\" scrolling=\"NO\"> </iframe>"
var book5="<iframe src=\"http://rcm-cn.amazon-adsystem.com/e/cm?t=a3guo-23&o=28&p=12&l=ur1&category=sha&banner=10TMH85P9VGGH48B5WG2&f=ifr\" width=\"300\" height=\"250\" scrolling=\"no\" border=\"0\" marginwidth=\"0\" style=\"border:none;\" frameborder=\"0\"></iframe>"
var book6="<iframe src=\"http://rcm-cn.amazon-adsystem.com/e/cm?t=a3guo-23&o=28&p=12&l=ur1&category=automotive&banner=1S3Z319Y3EJB5B5XMB02&f=ifr\" width=\"300\" height=\"250\" scrolling=\"no\" border=\"0\" marginwidth=\"0\" style=\"border:none;\" frameborder=\"0\"></iframe>"
var book7="<iframe src=\"http://rcm-cn.amazon-adsystem.com/e/cm?t=a3guo-23&o=28&p=12&l=ur1&category=automotive&banner=1696FR0WC1T9SYG8NQR2&f=ifr\" width=\"300\" height=\"250\" scrolling=\"no\" border=\"0\" marginwidth=\"0\" style=\"border:none;\" frameborder=\"0\"></iframe>"
var book8="<iframe id=\"f\" width=\"260px\" height=\"250px\" src= \"http://info.lm.tv.sohu.com/csp/0000000b345d91b50a44ab29b2d44b6fa8550606sk5/14581.do\" frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" allowtransparency=\"yes\" scrolling=\"NO\"> </iframe>"
var book10="<iframe id=\"f\" width=\"250px\" height=\"350px\" src= \"http://info.lm.tv.sohu.com/c/0000000b46796f717986adf0ee543d1a98425795d4y/14581.do\" frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" allowtransparency=\"yes\" scrolling=\"NO\"> </iframe>"
var book=Math.round(Math.random()*9)
if (book==0) book=book1
else if (book==1) book=book2
else if (book==2) book=book3
else if (book==3) book=book4
else if (book==4) book=book5
else if (book==5) book=book6
else if (book==6) book=book7
else if (book==7) book=book8
else if (book==8) book=book9
else book=book10
document.writeln(book)
}
</script>[/code]