// 注意看父窗体的 Title 变化。 oReload.onclick = function() { parentWindow.location.reload(); };改为// 注意看父窗体的 Title 变化。 oReload.onclick = function() { // false Default. Reloads the page from the browser cache. // true Reloads the page from the server. parentWindow.location.reload(true); };
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Parent</title>
</head> <body onload="document.title=new Date();">
<input type="button" id="btnOpen" value="Open ChildPage" />
<script type="text/javascript">
<!--
var oOpen = document.getElementById("btnOpen");
oOpen.onclick = function() {
window.showModelessDialog("childPage.html",window);
};//-->
</script>
</body>
</html>
// Child ====================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Child</title>
</head> <body>
<h3>Child Page</h3>
<input type="button" id="btnReload" value="Reload ParentPage" />
<script type="text/javascript">
<!--
var parentWindow = window.dialogArguments;
//alert();
var oReload = document.getElementById("btnReload");
// 注意看父窗体的 Title 变化。
oReload.onclick = function() {
parentWindow.location.reload();
};//-->
</script>
</body>
</html>
// 注意看父窗体的 Title 变化。
oReload.onclick = function() {
parentWindow.location.reload();
};改为// 注意看父窗体的 Title 变化。
oReload.onclick = function() {
// false Default. Reloads the page from the browser cache.
// true Reloads the page from the server.
parentWindow.location.reload(true);
};