這樣可以運(yùn)行
<!DOCTYPE html>
<html>
<head>
?<meta charset="utf-8">
?<title></title>
?<script type="text/javascript">
??function rec(){
???var mymessage=confirm("是否打開?");
???if (mymessage==true) {
?????var score=prompt("請輸入網(wǎng)址!");
??????var mywin=window.open("http://idcbgp.cn","width=300,height=200,top=100,left=0");
???}
???else{
????document.write("");
???}
??}
?</script>
</head>
<body>
<input type="button" name="button" onclick="rec()" value="點(diǎn)擊打開新窗口"/>
</body>
</html>
2020-03-28
score沒用