16
IE8/Chrome、FFはうまく動作しますが、Internet Explorer 7では頭がおかしくなります。Internet Explorer 7のJSONに関する問題
私はIE7が文句を言わない仕事という間違った何をした?$(".checklist label").click(function() {
checkResults();
});
function checkResults() {
var str = $("form").serializeArray();
$.ajax({
type: "POST",
url: "/data.asmx/GetTotal",
cache: false,
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ data: str }),
dataType: "json",
success: handleHtml,
error: ajaxFailed
});
}
function handleHtml(msg) {
$("#result").text(msg.d);
}
function ajaxFailed(xmlRequest) {
}
実際のフォームのための数値の結果を取得しようとしています
ありがとうございます。
あなたはjsを使う必要はありませんstringifyで、$ .ajaxのデータパラメータとしてオブジェクト全体を使用できます。 – MarrLiss
この回答はありがたいです。私は助けてくれました。 – Pranav
@MarrLiss IE7ではStringifyをする必要はないのですか? – Lijo