JS判断是正数还是负数函数:
function check(x){
if(x>0){
return '正数';
}else if(x<0){
return '负数';
}else{
return 0;
}
}
示例:

(adsbygoogle = window.adsbygoogle || []).push({});
来源:https://www.02405.com/archives/1725
JS判断是正数还是负数函数:
function check(x){
if(x>0){
return '正数';
}else if(x<0){
return '负数';
}else{
return 0;
}
}
示例:
来源:https://www.02405.com/archives/1725