照例先给演示: ================================================== 广告演示如下: 查看演示================================================== <SCRIPT LANGUAGE="JavaScript"> <!-- //////// 定义广告数 shu = 7 //////// 显示广告的说明.删掉代码也行. ad1='<FONT color=#ff0000></FONT>' //////// 广告内容 theAds = new Array(); theAds[1] = "广告代码1"; theAds[2] = "广告代码2"; theAds[3] = "广告代码3"; theAds[4] = "广告代码4"; theAds[5] = "广告代码5"; theAds[6] = "广告代码6"; theAds[7] = "广告代码7"; sx = parseInt(Math.random() * shu + 1); document.write(ad1+theAds[sx]); --></SCRIPT> 很简单的一段JS.可以作为一个文件在需要的地方调用.也可直接加在你想要显示广告的地方. 广告代码中不能有双引号.要用单引号. 我的使用方法:我是用 ITAKE 调用的 先在 forum.lng.module 中添加一个新的支点 我将它 取名 forum_ad 然后内容 填入上面的 JS代码 提交----清除缓存 在你要出现广告的地方 加上 {$=itake('module.forum_ad', 'lng')} 结束! enjoy`` 帖子被 jenfy 于 2007-04-09 14:18:10 编辑过 |