更新时间:2022-04-01 08:40:17
window.location
设置当前窗口的网址。要打开新窗口,您需要使用 window.open
。这应该有效:
window.location
sets the url of your current window. To open a new window, you need to use window.open
. This should work:
function ToKey(){
var key = document.tokey.key.value.toLowerCase();
if (key == "smk") {
window.open('http://www.smkproduction.eu5.org','_blank');
} else {
alert("Kodi nuk është valid!");
}
}