次のスクリプトで ajax 呼び出しを行っています。
window.onload = function() {
if (!session) {
layoutType = document.documentElement.clientWidth;
var xmlhttp;
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest();
}
else
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
window.location.reload();
}
}
xmlhttp.open("POST","core/session.php?bW=" + bW,true);
xmlhttp.send();
}
}
パヘの読み込み中に読み込み中の画像とテキストを挿入したい。どうすればそれができますか?
次の画像リンクとテキストを挿入したい:
<img src="cdn/images/ajax-loader.gif" />
<h3>Please wait while we load</h3>
助けてください。