私はajaxを使用して自分のページにデータを取得し、.html()を使用してdivのHTMLコンテンツを変更しています。 インターナショナルエクスプローラー以外のすべての機能は、Firefox、Google Chrome、Safari、Operaでうまく動作します。.html()がInternet Explorerで動作していません
IE 7,8,9が.html()関数に応答しないため、そのdivの内容は変更されません。ここ
は私のコードです:
var userurl = $('#userthumb a').attr('href');
$(document).ready(function(){
$('#userthumb').after("<div id='to-change'>Loading...</div>");
$.ajax({
type: "GET",
url: "parse.php",
data: "url=" + userurl,
dataType: 'json',
cache: false,
success: function(data)
{
var respond = data['respond'];
$('#to-change').html(respond + 'profile');
} //end of success
}); //end of ajax
});
は、何か問題がありますか、IEの問題を解決する方法はありますか?
返されるHTMLはどのようなものですか?タグを紛失するとIEに大混乱を招く可能性があります。 –
http://stackoverflow.com/questions/412734/jquery-html-attribute-not-working-in-ie – ComfortablyNumb
JSON {"respond": "username"} – sm21guy