這么寫還有優(yōu)化的空間嗎
<!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 message=confirm("是否打開新網(wǎng)頁?");
? ? if(message==true)
? ? {
? ? window.open('http://idcbgp.cn','_blank','width=400,height=500,top=100,left=0,toolbar=no,menubar=no');
? ? }
? ? else
? ? {
? ? ? ? return null;
? ? }
? }? ??
? </script>?
?</head>?
?<body>?
? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2019-11-13
2019-11-04
少滿足一個要求