问题描述
代码如下
打开
var myWindow;
函数openWin(){
myWindow = window.open(","myWindow","width = 200,height = 100");
myWindow.document.write("
这是"myWindow"
code as follows
Open
var myWindow;
function openWin() {
myWindow = window.open("", "myWindow", "width=200,height=100");
myWindow.document.write("
This is ''myWindow''
这是"myWindow"
This is ''myWindow''
推荐答案
window.open(skey, "_blank", "toolbar=1, scrollbars=1, resizable=1, width=" + 1015 + ", height=" + 800);
openWin()
函数.考虑:
1. JS区分大小写,例如openWin()与openwin()不同.
2.如果该功能在外部文件中,请正确导入它. HTML脚本src属性 [ ^ ]
在使用JS打开新窗口 [ ^ ]
function. Considering:
1. JS is case sensitive, e.g. openWin() is not the same as openwin().
2. If that function is in an external file, have you imported it properly. HTML script src Attribute[^]
Check out the working example at Open New Window with JS[^]
这篇关于新标签页不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!