input 前缀不被删除

    var str = "";  //设为全局变量
    $("select[name=countynum]").change(function(){
        if($("select[name=countynum]").val()=='330386'){
            $("#responsecode").val("LS_");
        }
        str = $("#responsecode").val();   //responsecode 责任书编号id
    });
    $("#responsecode").keyup(function(){
        if ($("#responsecode").val().indexOf(str) != 0){
            $("#responsecode").val(str);
        }
    })

 

相关文章:

  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-08-19
  • 2021-11-29
  • 2021-08-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2022-03-05
  • 2021-04-05
  • 2021-11-30
相关资源
相似解决方案