為什么按鈕沒(méi)有反應(yīng)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我們互動(dòng)下</title>
<script type="text/JavaScript">
function rec(){
??? var content=prompts("輸入你的內(nèi)容");
??? if(content=="JS進(jìn)階篇"){
??????? alert("關(guān)注JS高級(jí)篇");
??? }
??? else{
?? ??? ?alert("還是要多多看看JS");
??? }
?? ?
}
</script>
</head>
<body>
??? <input type="button" value="點(diǎn)擊按鈕" onclick="rec();" />
</body>
</html>
2017-10-31
prompt,不是prompts