jquery出现谷歌与IE和火狐的差异如何解决
$("#provinceOne").change(function(e){
$("#cityOne option").attr("hidden",true).html('');
e.preventDefault();
/*POST title to server*/
var provinceOne = $("#provinceOne").val();
$.ajax({
url: '<%=request.getContextPath()%>/mgr/places/findCitys',
type: 'POST',
contentType: "application/json;charset=UTF-8",
data: JSON.stringify({name:provinceOne}),
dataType: 'text',
success: function(data){
eval("cityOneArray="+data)
for(var i = 0 ; i<cityOneArray.length;i++){
$("#cityOne").append("<option>"+cityOneArray[i]+"</option>");
}
},error:function(){}
});
/* window.location.href=window.location.href; */
});
});
$("#provinceOne").change(function(e){
$("#cityOne option").attr("hidden",true).html('');
e.preventDefault();
/*POST title to server*/
var provinceOne = $("#provinceOne").val();
$.ajax({
url: '<%=request.getContextPath()%>/mgr/places/findCitys',
type: 'POST',
contentType: "application/json;charset=UTF-8",
//data: JSON.stringify({name:provinceOne}),
data: {name:provinceOne},//////该这样就行了,jq会自动转换的
dataType: 'text',
success: function(data){
eval("cityOneArray="+data)
for(var i = 0 ; i<cityOneArray.length;i++){
$("#cityOne").append("<option>"+cityOneArray[i]+"</option>");
}
},error:function(xhr){alert('错误了\n\n'+xhr.responseText)}//加错误回调看看是不是出错了
});
/* window.location.href=window.location.href; */
});
});