first, no prompts to refresh the Web page
We have not found that some pages, refresh, will pop up a prompt window, click "OK" will refresh. And some pages do not prompt, not pop-up prompts the window, directly on the refresh. If the page does not have a form, the prompt window does not pop up.
If the page has form forms,
A) < form method= "POST" ...> pop-up prompt window
b < form method= "get" ...> does not eject
second, JavaScript refresh the page method
Window.location.reload ();
Use window.open () pop-up pop-up window to refresh the parent window
Window.opener.location.reload ()
Using the Window.showdialog pop-up mode window
Window.dialogArguments.location.reload ();
three. javascript pop-up window code
Here are two examples of a pop-up screen centered window
Copy Code code as follows:
window.open () way
function ShowDialog (URL) {
var iwidth=300; Window width
var iheight=200;//window Height
var itop= (window.screen.height-iheight)/2;
var ileft= (window.screen.width-iwidth)/2;
window.open (
URL, "Detail", "Scrollbars=no,toolbar=no,location=no,direction=no,resizeable=no,
Width= "+iwidth+", height= "+iheight+", top= "+itop+", left= "+ileft"
);
}
window.showModalDialog Way
function ShowDialog (URL) {
var iwidth=300; Window width
var iheight=200;//window Height
var itop= (window.screen.height-iheight)/2;
var ileft= (window.screen.width-iwidth)/2;
window.showModalDialog (
Url,window, "dialogheight:" +iheight+ "Px;dialogwidth:" +iwidth+ "PX;
Dialogtop: "+itop+"; Dialogleft: "+ileft+"; Resizable:no; Status:no;scroll:no "
);
}
Notice the second argument here, window
Four, the mode window, the Link pop-up new window problem
Join < base target= "_self" > between
How to close the page without prompting
Copy Code code as follows:
function Closewin () {
var ua = navigator.useragent; var ie = navigator.appname==
"Microsoft Internet Explorer"? True:false;
if (IE) {
var ieversion = parsefloat (ua.substring (Ua.indexof ("MSIE") +5,
Ua.indexof (";", Ua.indexof ("MSIE")));
if (ieversion< 5.5) {
var str =;
Document.body.insertAdjacentHTML ("BeforeEnd", str);
Document.all.noTipClose.Click ();
} else {
Window.opener =null; Window.close ();
}
}else{
Window.close ()
}
}