xszhang911 2015-07-18 15:34 采纳率: 0%
浏览 1828
已采纳

关于JavaScript中的window.open方法

今天下了Myeclipse,打算试试做jsp和Html
然后写了如下测试代码;
<!DOCTYPE html>


WindowsDemo.html
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">
<script>
    function fun(thisurl){
        window.open(thisurl,"页面标题","width=370,heigth=160,scrollbars=yes,resizeable=no");
    }
</script>



This is my HTML page.


代码很简单,就是加载的时候,弹出1个新窗口,但是我在Myeclipse里面,弹不出窗口,
将代码复制到记事本,改成html打开,却能弹出窗口,请问什么问题.
新手求助.

  • 写回答

4条回答 默认 最新

  • threenewbee 2015-07-18 15:55
    关注

    Myeclipse可能会阻止弹窗,以浏览器的结果为准。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?