<script type="text/javascript">
jQuery(document).ready(function(){
//选择工程人员控制语句
jQuery("#divf button").click(function(){
//监听选择工程验证人员选择事件
// alert(jQuery("#field16389").val())
var bm = jQuery("#field16394").val(); //选择的工程验证人员所在部门
var dubm = jQuery("#field16393").val();//设置的可选的部门
//判断是否选择了人员,是否为空
if(jQuery("#field16389").val()!=""){
var dubmarr = dubm.split(",");
var length = dubmarr.length;
var a=0;
for(var i=0;i<parseInt(length);i++){
if(parseInt(bm)==parseInt(dubmarr[i])){
a++;
}
}
if(a<1){
alert("选择的人员不属于工程部,请重新选择!!!");
jQuery("#field16389,#field16394").val("");
jQuery("#field16389span").html('<IMG src="/images/BacoError.gif" align=absMiddle />');
}
}else{
jQuery("#field16394").val("");
jQuery("#field16394span").html("");
}
});
});
</script>
Please leave a message in the comment area and discuss together~~~
If necessary, please contact WeChat: hdygzh2019 At the same time, please explain your intention and make progress together! ! !