锘??xml version="1.0" encoding="utf-8" standalone="yes"?> Typically, the browser creates one window object when it opens an HTML document. However, if a document defines one or more frames (that is, contains one or more frame or iframe tags), the browser creates one window object for the original document and one additional window object for each frame. These additional objects are child windows of the original window and can be affected by actions that occur in the original. For example, closing the original window causes all child windows to close. You can also create new windows (and corresponding window objects) using methods such as open, showModalDialog, and showModelessDialog.
function makeRequest(url) {
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if(http_request.overrideMimeType){
http_request.overrideMimeType('text/xml');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Giving up Cannot create an XMLHTTP instance');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('GET', url, true);
http_request.send(null);
}
function alertContents() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
alert(http_request.responseText);
} else {
alert('There was a problem with the request.');
}
}
}
</script>
<span style="cursor: pointer; text-decoration: underline" onclick="makeRequest('test.html')"> 鍙戝嚭璇鋒眰</span>
鍘熸枃鍦板潃錛?A >http://www.hibernate.org.cn/viewtopic.php?t=15156
window.parent.returnValue = value1;
window.parent.close();
}
榪欐牱涓涓嚱鏁扮殑鏃跺欙紝鏈夌偣妯$硦錛屽悗鏉ユ煡鐪婱SDN緇堜簬鎵懼埌絳旀銆?BR>window Object Represents an open window in the browser. (琛ㄧ幇鍦ㄦ祻瑙堝櫒涓墦寮涓涓獥鍙c?
濡傛灉涓涓枃妗e畾涔変簡涓涓垨澶氫釜妗嗘灦錛屾祻瑙堝櫒涓烘瘡涓涓鏋跺垱寤轟竴涓獁indow瀵硅薄涓鴻繖涓簮document鍜屼竴涓檮鍔犵殑window瀵硅薄銆?榪欎簺闄勫姞鐨勫璞℃槸婧愭枃妗g殑瀛恮indows,騫朵笖鍙楁簮鍔ㄤ綔鐨勫獎鍝嶃備緥濡傦紝鍏抽棴榪欎釜婧愮獥浣撳鑷村瓙紿椾綋涔熻鍏抽棴銆?BR>
Sets or retrieves the value returned from the modal dialog window.