我在jsp中嵌入了以下内容。目的是使用指定的选项打开一个新的JSP。但是当页面加载时窗口不会打开。
我做错了吗?
感谢
<body>
<script type="text/javascript">
$().ready(function() {
var siteId = getUrlVars()[PARAMS.GENERAL.SITEID];
var options = "channelmode=" + 1 +
",resizable=" + 1 +
",menubar=" + 0 +
",toolbar=" + 0 +
",location=" + 0 +
",titlebar=" + 1 +
",status=" + 1 +
",scrollbars=" + 1;
var name = "reporting";
var appURL = "t.htm?" PARAMS.GENERAL.SITEID + "=" + siteId;
window.open(appURL,name,options);
});
</script>
答案 0 :(得分:0)
试试这个
window.open(appURL,name,options,target="_blank");
答案 1 :(得分:0)
var appURL = "t.htm?" + PARAMS.GENERAL.SITEID + "=" + siteId;
<body>
<script type="text/javascript">
$().ready(function() {
var siteId = getUrlVars()[PARAMS.GENERAL.SITEID];
var options = "channelmode=" + 1 +
",resizable=" + 1 +
",menubar=" + 0 +
",toolbar=" + 0 +
",location=" + 0 +
",titlebar=" + 1 +
",status=" + 1 +
",scrollbars=" + 1;
var name = "reporting";
var appURL = "t.htm?" + PARAMS.GENERAL.SITEID + "=" + siteId;
window.open(appURL,name,options);
});
</script>