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

Javascript
一个qq菜单效果
一个用js实现过滤重复字符的函数
javascript 一个自定义长度的文本自动换行的函数
用js实现的一个根据内容自动生成表格的函数
图片格式的JavaScript和CSS速查手册
关于恒等于(===)和非恒等于(!==)
fix-ie5.js扩展在IE5下不能使用的几个方法
javascript实现上传图片前的预览(TX的面试题)
lib.utf.js
可以把编码转换成 gb2312编码lib.UTF8toGB2312.js
真见识了-全代码编写的图片
ASP中用Join和Array,可以加快字符连接速度的代码
javascript之弹出窗口居中的代码
识别操作系统是不是vista的js代码
js自动滑动+鼠标滑动区域
LBS blog sql注射漏洞[All version]-官方已有补丁
有一段有意思的代码-javascript现实多行信息
javascript在一段文字中的光标处插入其他文字
Google韩国首页图标动画效果
新发现原来documenet.URL也可以实现页面跳转

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 125 ::
收藏到网摘: 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>');
}
// -->