<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<title>window.open</title>
<script?type="text/javascript">
?function?Wopen(){????var?mymessage=?confirm("確定要打開B站嗎");
???if(mymessage==true);
?????????????????{??????????
????window.open('https://www.bilibili.com'?,'_blank','height=600,width=400,top=100,left=0');?
??????????????????????}???
???else???
???????{????
??????????????alert("打開失敗!");?
????????}
?????}
</script>
</head>
<body>??
<input?name="button"?type="button"?onClick="Wopen()"?value="點擊我,打開新窗口!"?/?>
</body>
</html>
2019-01-03
還有alert后面的分號好像是中文的
2019-09-29
應該是網(wǎng)頁上編寫的一些功能實現(xiàn)不了? 我在開發(fā)軟件上試了一下是可以實現(xiàn)的
2019-01-04
2019-01-04
?
if(mymessage==true);后面分號去掉
2019-01-02
去掉?if?后面的分號