prompt中如果什么都不輸入 那會返回什么?
function rec(){
var score; //score變量,用來存儲用戶輸入的成績值。
score = prompt("請輸入您的分?jǐn)?shù):","90");
if(!isNaN(score)||score==null)?
{
? ? if(score>=90)
? ?{
? ? ? document.write("你很棒!");
? ? }
? ?else if(score>=75)
? ? ? ? ?{
? ?document.write("不錯吆!");
? ? }
? ? ? ? ?else if(score>=60)
? ? ? ? {
? ? document.write("要加油!");
? ? ? ? ?}
? ? ? ? ? ? ? ? ?
? }else{
? ? ? alert("請輸入數(shù)字");
? }
? }
? null是不對的。。。
2018-09-30
返回空字符串""
2018-09-01
什么都不會返回,沒效果變化