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

Javascript
js实现图片显示局部,鼠标经过显示全部的效果
Javascript 更新 JavaScript 数组的 uniq 方法
JavaScript 数组的 uniq 方法
js菜单代码js菜单特效代码
用dom+xhtml+css制作的一个相册效果代码打包下载
Javascript优化技巧(文件瘦身篇)
ImageFlow可鼠标控制图片滚动
js实现form自动完成功能
js 生成随机汉字的问题
一个js封装的不错的选项卡效果代码
setInterval 和 setTimeout会产生内存溢出
setAttribute 与 class冲突解决
window.addeventjs事件驱动函数集合addEvent等
javascript replace方法与正则表达式
js 替换
javascript下利用for( in )语句 获得所有事件名称的代码
javascript下用for( in )语句 获得所有style 内容的脚本代码
javascript下for( in )语句 获得所有style 的【scrollbar】滚动条样式内容
javascript创建数组的最简代码
中国象棋js代码,仅演示,未能真下

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


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