Source: http://www.cnblogs.com/adandelion/archive/2005/10/26/262666.html
The showmodaldialog cache is serious. The following is how to cancel the client cache settings in the subwindow.
<Meta http-equiv = "expires" content = "0">
<Meta http-equiv = "cache-control" content = "no-Cache">
<Meta http-equiv = "Pragma" content = "no-Cache">
Bytes -----------------------------------------------------------------------------------------
Farther.html
---------------------------
<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<HTML>
<Head>
<Title> new document </title>
<Meta name = "generator" content = "editplus">
<Meta name = "author" content = "">
<Meta name = "keywords" content = "">
<Meta name = "Description" content = "">
<Script language = "JavaScript">
<! --
Function openchild (){
VaR K = Window. showmodaldialog ("child.html", window, "dialogwidth: 335px; Status: No; dialogheight: 300px ");
If (K! = NULL)
Document. getelementbyid ("txt11"). value = K;
}
// -->
</SCRIPT>
</Head>
<Body>
<Br> value passed to the parent window: <input id = "txt9" type = "text" value = "3333333333333"> <br>
Returned value: <input id = "txt11" type = "text"> <br>
Value set in the subwindow: <input id = "txt10" type = "text"> <br>
<Input type = "button" value = "openchild" onclick = "openchild ()">
</Body>
</Html>
---------------------------------------------------------------
Child.html
--------
<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<HTML>
<Head>
<Title> new document </title>
<Meta name = "generator" content = "editplus">
<Meta name = "author" content = "">
<Meta name = "keywords" content = "">
<Meta name = "Description" content = "">
<Meta http-equiv = "expires" content = "0">
<Meta http-equiv = "cache-control" content = "no-Cache">
<Meta http-equiv = "Pragma" content = "no-Cache">
</Head>
<Body>
<Br> value passed by the parent window: <input id = "txt0" type = "text"> <br>
Enter the value of the parent window to be set: <input id = "txt1" type = "text"> <input type = "button" value = "set the value of the parent window" onclick = "setfather ()"> <br>
Value returned by the input: <input id = "txt2" type = "text"> <input type = "button" value = "" onclick = "retrunvalue ()">
<Input type = "button" value = "Close refresh parent window" onclick = "">
</Body>
</Html>
<Script language = JavaScript>
<! --
VaR K = Window. dialogarguments;
// Obtain the value passed by the parent window
If (K! = NULL)
{
Document. getelementbyid ("txt0"). value = k.doc ument. getelementbyid ("txt9"). value;
}
// Set the value of the parent window
Function setfather ()
{
K.doc ument. getelementbyid ("txt10"). value = Document. getelementbyid ("txt1"). Value
}
// Set the value returned to the parent window
Function retrunvalue ()
{
VaR S = Document. getelementbyid ("txt2"). value;
Window. returnvalue = s;
Window. Close ();
}
// -->
</SCRIPT>
----------------------------