JS随机广告代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>JS随机广告代码</title><script LANGUAGE="Javascript"> <!-- BANNER ROTATOR var how_many_ads = 3 var now = new Date() var sec = now.getSeconds() var ad = sec % how_many_ads; ad +=1; //**************************** 广告一 **************** if (ad==1){ url="http://www.51xuediannao.com/show/blog/20091028/149.html"; alt="网页设计欣赏_懒人建站"; banner="http://www.51xuediannao.com/uploads/allimg/091028/1-09102Q24F10-L.png"; width="468"; height="150"; } //**************************** 广告二 **************** if (ad==2) { url="http://www.51xuediannao.com/show/"; alt="JS广告代码_懒人建站"; banner="http://www.51xuediannao.com/uploads/allimg/091009/1-091009135618-lp.png"; width="468"; height="150"; } //**************************** 广告三 **************** if (ad==3) { url="http://www.51xuediannao.com/JS/"; alt="导航菜单_懒人建站"; banner="http://www.51xuediannao.com/uploads/allimg/091009/1-0910091353380-L.png"; width="468"; height="150"; } document.write('<center>'); document.write('<a href=\"' + url + '\" target=\"_blank\">'); document.write('<img src=\"' + banner + '\" width=') document.write(width + ' height=' + height + ' '); document.write('alt=\"' + alt + '\" border=0><br>'); document.write('</center>'); --></script> </head> <body> </body> </html>
版权声明:admin 发表于 2020-03-02 12:20:32。
转载请注明:JS随机广告代码 | 甄选网

暂无评论

暂无评论...