日期:2014-05-16  浏览次数:20378 次

网页的弹窗怎么弄?跪等高手
打开网页后,弹窗

基本代码:
<script LANGUAGE="javascript"> 
<!-- 
window.open ("tanchuang.html") 
--> 
</script>

但是这个代码一般的浏览器都会被拦截,有没有别的方法??

还有以下几个问题:
1、设置时间,例如打开网页后3秒钟弹出
2、打开网页后,鼠标点击后才会打开弹窗(鼠标不会变成小手)



我看很多网站都是这样的,小白不懂,真心求教!!!
网页弹窗 javascript 浏览器

------解决方案--------------------
一般来说用户事件函数中的window.open不会被屏蔽,但具体也看浏览器机制
所以网页弹窗一般不用window.open,用弹出层
------解决方案--------------------
那些垃圾广告代码是直接在页面上加一个透明层,你链接看得到,点不到,点一次它开了广告窗口后才取消透明层,给你点下面的链接。
------解决方案--------------------
做个全屏的a,target="_blank",用户一点击a就隐藏,也同时弹出了你的窗口。。

如1#说的,非用户事件中的window.open都会被干掉的多。。
------解决方案--------------------
新窗口 ext.window ?
------解决方案--------------------

    <!DOCTYPE html>  
    <html style="width:100%;height:100%;overflow:hidden">  
    <head>  
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
        <title>Window - jQuery EasyUI Demo</title>  
        <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">  
        <link rel="stylesheet" type="text/css" href="../themes/icon.css">  
        <link rel="stylesheet" type="text/css" href="demo.css">  
        <script type="text/javascript" src="../jquery-1.7.2.min.js"></script>  
        <script type="text/javascript" src="../jquery.easyui.min.js"></script>  
        <script>  
            function resize(){  
                $('#w').window('resize',{  
                    width: 600,  
                    height: 300  
                });  
            }  
            function open1(){  
                $('#w').window('open');  
            }  
            function close1(){  
                $('#w').window('close');