良值手柄连接电脑需要什么其他东西

2025-06-27 23:04:34
推荐回答(1个)
回答1:

函数如下
script language=;javascript;;
function getLevel(score){
if(isNaN(score)score0score;100) return ;error;;
var tempScore = parseInt(score)/10;
switch (tempScore){
case 10: return ;优;;
case 9: return ;优;;
case 8: return ;良;;
case 7: return ;一般;;
case 6: return ;及格;;
default: return ;不及格;;
}
}
alert(getLevel(50.5));
/script;