jquery bind onpropertychange

jquery 代码:

$(document).ready(function (){
	$("#zqmj").bind("propertychange",function (){	
		var zqmjVal=$("#zqmj").val();
		var deptment='${appUser.regionid}';
		if(zqmjVal!=null && $.trim(zqmjVal).length>0 && !isNaN(zqmjVal)){
			if($.trim(zqmjVal).length==6){
				$.post("<%=request.getContextPath()%>/wfxx/simple.do?method=searchZqmj",{zqmj:zqmjVal,ssdw:deptment},
					function (data){
						$("#szdw").val(data.ssdwdm);
						$("#szdw1").val(data.dwmc);		
						$("#zqmjdm option[zqmj='"+zqmjVal+"']").attr("selected", true);	
					}, "json"
				);
			}
			else{
				$("#szdw").val("");
				$("#szdw1").val("");
				$("#zqmjdm ").get(0).selectedIndex=0;
			}
		}
	})
});



你可能感兴趣的:(jquery bind onpropertychange)