哪里出問題了呢 ? 幫一下
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>? ?
? <script type="text/javascript"> ?
? function openWindow(){????????????? //定義一個(gè)函數(shù)???????? ?
????? var sure=confirm("請(qǐng)問是否打開");?????????? //確認(rèn)框
????? if(sure==true){
?????? var home=prompt("請(qǐng)輸入您要打開的網(wǎng)址","");???????????????????? //輸入打開的網(wǎng)址
?????? window.open(home,"width=400px,height=500px","_blank","menubar=no,toolbar=no");??????????????????? //打開輸入的新窗口
?????? sure_one=confirm("是否關(guān)閉網(wǎng)址");?? ?
??????? if(home!=NULL){
??????????? home.close();
??????? }
????? }else{
???????? document.write("Thanks For You! ");
?????? }
????? }
? </script>
?</head>
?<body>
????? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
?</body>
</html>
2016-09-06
charset="utf-8"
?window.open(home,"_blank""width=400px,height=500px,menubar=no,toolbar=no");
2016-09-06
charset=UTF-8 ?這樣就不會(huì)亂碼了
2016-09-06
亂碼是嗎?
<head>下面加一句,
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">