這個(gè)怎么回事?死活不行呢?
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>? ?
? <script type="text/javascript"> ?
function openwindow(){
??? var openwin = confirm("是否打開新窗口?");
??? if(openwin)
??? {
??????? var myweb = prompt("請(qǐng)輸入你要打開的網(wǎng)址:"," http://idcbgp.cn/");
?? ??? ?if(myweb!=null)
?? ??? ?{
?? ??? ??? ?window.open('http://idcbgp.cn/',width=400,height=500);
?? ??? ?}
?? ?
?? ?}?? ?
??? }
????? ?
? </script>
?</head>
?<body>
????? <input type="button" value="新窗口打開網(wǎng)站" onclick="openwindow()" />
?</body>
</html>
2015-02-28
謝謝!成了!
2015-02-28
這一句window.open('http://idcbgp.cn/',width=400,height=500);括號(hào)內(nèi)的引號(hào)不對(duì),open方法里頭所有內(nèi)容都需要引號(hào)