当前位置: 代码迷 >> 综合 >> js Uncaught TypeError: status is not a function
  详细解决方案

js Uncaught TypeError: status is not a function

热度:57   发布时间:2023-09-20 00:48:15.0

status是windows的保留关键字,虽然我定义了这个函数,但还是会报错

 var searchvalue;
function status(searchvalue){
    if(searchvalue=="1"){
        return "未启用";
    }else if(searchvalue=="2"){
        return "已启用";
    }else if(searchvalue=="3"){
        return "已停用";
    }else{
        return "-"
    }
}

  相关解决方案