下面代碼這里為什么alert彈不出來?
<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 jump(){
? ? ? ? var mymessage=confirm("JS進(jìn)階篇");
? ? ? ? if(mymessage==true){
? ? ? ? ? ? alert("關(guān)注JS高級篇");
? ? ? ? }
? ? ? ? else{
? ? ? ? ? ? null;
? ? ? ? }
? ? }
</script>
? ??
</head>
<body>
<form>
? ? <input type="buttom" value="點擊這兒" onclick="jump()"/>
</form>
</body>
</html>
2016-10-27
buttom拼寫錯了,是button
2016-03-05
?var mymessage=confirm("JS進(jìn)階篇");
?alert("關(guān)注JS高級篇");
后面這2個用的是中文的冒號 應(yīng)該改為英文的冒號