var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
// 异步调用
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4) // 调用完毕
{
if (xmlhttp.status == 200) // 加载成功
{
var xmldoc = xmlhttp.responseText;
parent.FriendList.document.close();
parent.FriendList.document.open();
parent.FriendList.document.write("<p>");
parent.FriendList.document.write("<HTML><body bgColor=#9999cc>");
parent.FriendList.document.write(xmldoc);
parent.FriendList.document.write("</body></HTML>");
}
}
}
var url = "AddFriend.aspx?FriendID="+document.Form1.txtBoxReceiver.value;
xmlhttp.open("POST", url, true);
xmlhttp.send();