当前位置: 首页 > 图文教程 > 网络编程 > Javascript > [原创]站长必须要知道的javascript广告代码

Javascript
javascript下拉框不被选中大类的区别方法
firefox浏览器下javascript 拖动层效果与原理分析代码
javascript 常用关键字列表集合
[原创]后缀就扩展名为js的文件是什么文件
初学JS的的小例子 javascript replace高亮替换
项目实践之javascript技巧
不间断滚动JS打包类,基本可以实现所有的滚动效果,太强了
javascript数组使用调用方法汇总
JS的递增/递减运算符和带操作的赋值运算符的等价式
JavaScript开发时的五个注意事项
js中将多个语句写成一个语句的两种方法小结
javascript while语句和do while语句的区别分析
带参数的function 的自运行效果代码
看了就知道什么是JSON
js模拟实现Array的sort方法
JavaScript创建命名空间(namespace)的最简实现
文本链接逐个出现的js脚本
我见过最全的个人js加解密功能页面
CLASS_CONFUSION JS混淆 全源码
javascript轻松控制表格列样式的脚本代码

Javascript 中的 [原创]站长必须要知道的javascript广告代码


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 137 ::
收藏到网摘: n/a

参考了sina的代码,想出来的一个代码,请大家使用,不要传播,转载请注明:来自软晨学习网
<!--
//时间计算
var showit=false;
var today=new Date();
var urlpath;
function testdate()
{
urlpath='http://www.scripthome.net/bbs';showit=true
if(today.getHours()>='10' && today.getHours()<'12')
{
urlpath='http://www.ruanchen.com';showit=true
}
}
testdate();
var MSIE=navigator.userAgent.indexOf("MSIE");
var OPER=navigator.userAgent.indexOf("Opera");
if(showit==true)
{
if (document.all && MSIE!=-1 && OPER==-1) {
// this is a 4.x browser, no?
function changediv(){
document.getElementById('hiddenLayer').style.display = "block";
document.getElementById('interstitialFrame').src = urlpath;
setTimeout("hidediv()",5000)
}
function hidediv(){
document.getElementById('hiddenLayer').style.display="none";
SYtag=2;
}
function showfull(){
setTimeout("changediv()",2000);
}
showfull();
}}
if(showit==true)
{
if (document.all && MSIE!=-1 && OPER==-1) {
// this is a 4.x browser, no?
document.write('<DIV ID="hiddenLayer" style="display: none; height: 0">');
expandableIframe = '<IFRAME id="interstitialframe" width=0 HEIGHT=0 NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0></IFRAME>';
document.write(expandableIframe);
}
document.write('</div>');
}
// -->