為什么我的confirm彈框總是不彈出來(lái)?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>confirm</title>
? <script type="text/javascript">
? function rechpe(){
????? var confirm=confirm("Are you a boy?");
????? if(confirm==true){
????????? document.write("i am boy");
????? }else{
????????? document.write("i am girl");
????? }
? }
? </script>
</head>
<body>
??? <input name="button" type="button" onClick="rechpe()" value="點(diǎn)擊我,彈出確認(rèn)對(duì)話框" />
</body>
</html>
2019-08-29
變量名不能取關(guān)鍵字和保留字
2019-08-17
你的變量名改成別的,變量名是不能取關(guān)鍵字或保留字的
2019-08-15
對(duì)的。?
2019-07-02
我知道原因了,變量名confirm與方法名重名了