為什么會(huì)彈出兩個(gè)框呢?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我們互動(dòng)下</title>
<script type="text/javascript">
? ? //document.write("Js進(jìn)階版");
? ? //alert("js高級(jí)版");
? ? var p=confirm("你初級(jí)學(xué)過了嗎?")
? ? if(p==true){
? ? ? ? document.write("你需要學(xué)Js進(jìn)階版")
? ? }
? ? else{
? ? ? ? document.write("你要繼續(xù)加油?。?!")
? ? }
? ??
? ? </script>
? ??
</head>
<body>
?
<form><inpute type="button" onClick="p" value="點(diǎn)擊確認(rèn)"></inpute>
</form>
? ??
</body>
</html>
2018-09-05
只彈出一個(gè)啊
2018-09-05
新建一個(gè)html文件,把代碼粘貼進(jìn)去, 只彈出一個(gè)。。