2-1不知道哪里錯(cuò)了
<!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">
function jump(){
? ? var mymessage=confirm("關(guān)注js高級(jí)篇");
? ? if (mymessage==true)
? ? {?
? ? ? ? document.write("恭喜你成為高級(jí)");
}
? ? else
? ? {?
? ? ? ? document.write("請(qǐng)你繼續(xù)加油");
}
}
</script>
</head>
<body>
? ? <p id="con">js進(jìn)階篇</p>
? ? <form>
? ? ? ? <input type="button" onclick="jump()" value="點(diǎn)擊進(jìn)入"/>
? ? </form>
</body>
</html>
2019-03-13
? ? ? ? ? ? ?document.write( mymessage ? '恭喜你成為高級(jí)' : '請(qǐng)你繼續(xù)加油' )
2019-03-13
謝謝啦,沒(méi)問(wèn)題
2019-03-13
好的我試試看
2019-03-13
document.write("請(qǐng)你繼續(xù)加油");
分號(hào)應(yīng)該是英文狀態(tài)下的分號(hào)