jQuery ajax调web service无法取得信息,解决就发分啦~~急
我如下这个js代码在Google chrome,IE9,firefox都没问题,可是在IE8下就取不到信息了.
<script type="text/javascript">
function GetEQIDList(ModuleID)
{
$.ajax({
type:"POST",
contentType:"application/json",
url:"/FDCService/FDCService1.asmx/GetToolIDs",
data:"{moduleID:'"+ModuleID+"'}",
datatype:'json',
success:function(result){
try{
$('#toolList').empty();
$("#toolList").append("<option value='" + "All" + "'>" + "All" + "</option>");
$(result.d).each(function() {
$("#toolList").append("<option selected='selected' value='" + this + "'>" + this + "</option>");
});
}catch(e){
alert(e);
}
},
error: function(result, status){
if(status=='error'){
alert(result);
}
}
});
}
</script>
<?xml version="1.0" encoding="UTF-8"?>
-<ArrayOfString xmlns="http://tempuri.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <string>ACCCUA01</string> <string>ACCCUA02</string> <string>ACCCWA01</string> <string>ACCOXA01</string> <string>ACCSTA01</string> </ArrayOfString>