求解為什么沒有彈窗呢?
<!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>我們互動下</title>
<script type="text/javascript">
? ? function jum(){
? ? ? ? var mayar=confirm("關(guān)注JS高級篇");
? ? ? ? if(mayar==true){
? ? ? ? ? ? document.write("恭喜你進(jìn)入年薪百萬的節(jié)奏!");}
? ? ? ? ? ? else{
? ? ? ? ? ? ? ? document.write("你還是個(gè)屌絲。");}
? ? ? ? }
? ? ? ??
</script>
</head>
<body>
<p id="con">JS進(jìn)階篇</p>
<form>
? ? <input type="button" onclick="jum()" value="點(diǎn)擊進(jìn)入"/>
</form>
</body>
</html>
2018-03-18
圖中我圈出來的部分,用英文分號就可以了。