访谈提纲的设计:help!!!!

来源:百度文库 编辑:高校问答 时间:2024/05/10 06:38:31
//假
<script>
var userChoice = window.confirm("Choose OK or Cancel");
var result=(userChoice==ture) ? "sure" : "not sure";
document.write(result);
</script>

//真
<script>
var userChoice = window.confirm("Choose OK or Cancel");
var result=(userChoice==true) ? "sure" : "not sure";
document.write(result);
</script>

这两个代码看似一样
但是真的那个能正常运行 假的却不行
他们的差别在哪呢??

上面的true拼错