当我要使用 AJAX 提交数据时,IE 显示错误,例如object doesn't support this property or method
$("#savebasicInfo").live("click",function()
{
var lookingfor='';
var interestedIn='';
$(".lookingfor").each(function(i)
{
if(this.checked == true)
{
lookingfor= lookingfor+","+$(this).val().trim(); // error found here
}
i++;
});
$(".interestedIn").each(function(j)
{
if(this.checked == true)
{
interestedIn= interestedIn+","+$(this).val().trim(); // error found here
}
j++;
});
$.ajax(
{
type: "POST",
url: $("#cfgRoot").val()+'/accounts/basicInfoPost.php',
data:
{
city:$("#city").val().trim(),
hometown:$("#hometown").val().trim(),
interestedIn:interestedIn,
relationship:$("#relationship").val().trim(),
lookingfor:lookingfor,
political:$("#political").val().trim(),
religious:$("#religious").val().trim()
},
success: function(responce)
{
if(responce == 1)
{
$("#basicProfileMain").load("basicInfoMain.php");
$("#basicProfileMain").css({"height":"auto"});
}
}
});
});