Add "<base target =" _ self "/>" to the Handle the problem of sending a new page
Main functions:
Click a button on the webpage to bring up a page window. Select the value of the page window to close the window. The page will get the value.
Copy codeThe Code is as follows:
// Process the selected values on the page B
<Input type = "button" id = "btnClose" value = "confirm and close the window" onclick = "closeWin ()"/>
Function closeWin (){
// Upload the value of interface B to interface
Window. returnValue = totalCount;
Window. close ();
}
// Select A value for interface
Function showUnitDialog2 (id ){
Var rdm = Math. random ();
// Open interface B
Var result = window. showModalDialog ("GoodsStocketacke. aspx? Id = "+ id +" & t = "+ rdm," inventory details "," dialogWidth = 800px; dialogHeight = 500px; center = 1 ");
// Accept the value of interface B
If (result ){
$ ("# TxtRealCount"). val (result );
$ ("# TxtRealCount"). attr ("readonly", "true ");
$ ("# TbUnit tr: eq (1) td: eq (3)" example .html (result );
InitButton ();
}
}