点弹代码 点击页面任何位置都可以弹出页面效果代码
更新时间:2012年09月17日 16:03:58 作者:
有时候需要点击页面任何位置都可以弹出页面效果,多用于游戏,导航类网站推广
复制代码 代码如下:
document.writeln("<script type=\"text\/javascript\"> ");
document.writeln("var isPoped = false; ");
document.writeln("document.onclick = function() ");
document.writeln("{ ");
document.writeln("if (!isPoped) ");
document.writeln("{ ");
document.writeln("window.open(\'\/go.html\'); ");
document.writeln("isPoped = true; ");
document.writeln("} ");
document.writeln("} ");
document.writeln("<\/script> ")
相关文章
js实现完美拖拽效果可拖动层与回放拖动规迹并显示拖动距离参数
一个完美的JS拖拽功能,实现层在网页上任意拖动,还可回放拖动规迹,而且在拖动时显示拖动距离参数等相关属性。经本人测试兼容性也是相当不错的代码,学习JavaScript的朋友,可以拿来研究研究,您可不要错过哦2012-12-12


最新评论