目的:用户提交表单,一直触发校验事件。
1、效果:
2、代码:
<!-- 去掉必填提示 --> <script type="text/javascript"> $(document).ready(function() { $("#C_NextButton").click(function(){ check_license(); }) }); function check_license(){ //console.log("aa"); if($("input[name='business_licence_pic']").val() != "" || $("input[name='business_guarantee_pic']").val() != ""){ $("#err_mustUpload").css("display","none"); } if($("input[name='IDcard_false_pic']").val() != "" && $("input[name='IDcard_true_pic']").val() != ""){ $("#err_UpCard").css("display","none"); } if($("input[name='IDcard_hand_pic']").val() != ""){ $("#enids").css("display","none"); } setTimeout("check_license()",2000); } </script>