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);
        }
    })

 

posted on 2015-09-08 10:15  勤奋者努力着  阅读(888)  评论(0编辑  收藏  举报

导航