求救!!!!js 一个网页第一次点击任何地方弹出广告页面,第二次就不会弹出jsJavaScript 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!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=utf-8" /><title>无标题文档</title><script type="text/javascript"> window.onload=function(){ var div=document.getElementsByTagName("div")[0]; div.onclick=function(){ alert('ad'); div.onclick=null; } }</script></head><body><div style="position:absolute; left:0px; top:0px; width:100%; height:100%"><div>123</div><input type="button" value="ss" /><input type="text" value="text" /></div></body></html>类似这样试试 谢谢你,不过我要的不是这种效果啊!我要的是像这个网址那样的:http://www.3454.com/lol你试试看看那个效果 最上面 放一个 透明的div点了 出广告 然后 div消失 用jquery$(document).click(function(){ ......弹出广告 $(document).unbind("click");});或document.onclick=function(){ ......弹出广告 document.removeAttribute("onclick");}; jquery:$("body").one("click", function(){ alert("广告");}) 怎么用js控制页面100%显示 字幕的数据结构问题?求解决 请教一个js正则表达式 如何限定文本框输入的值长度呢?? 送分!(js源代码)超酷超绚精美图片展示效果 请问如何改变一个控件在网页中的位置 在<body onload="javascript:document.forms[0]['Button1'].value=Date();">中,froms[0]代表什么意思??? 帮我看看,我给一个公司做了个网站(已完),应该收多少钱 JS中调用Applet中方法 求全面数组转换为树算法 可编辑下拉菜单请教! jquery多次触发div hover事件,百思不得其解,请各位指教!急急急急急急
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
window.onload=function(){
var div=document.getElementsByTagName("div")[0];
div.onclick=function(){
alert('ad');
div.onclick=null;
}
}
</script>
</head><body>
<div style="position:absolute; left:0px; top:0px; width:100%; height:100%">
<div>123</div>
<input type="button" value="ss" />
<input type="text" value="text" />
</div>
</body>
</html>
类似这样试试
你试试看看那个效果
点了 出广告 然后 div消失
$(document).click(function(){
......弹出广告
$(document).unbind("click");
});
或
document.onclick=function(){
......弹出广告
document.removeAttribute("onclick");
};
alert("广告");
})