<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JAVA</title>
</head>
<body>
<script language="javascript">
function Check()
{
var display1 =  document.getElementByID("display1");
display1.style.display="";
display1.reload(true);
}
</script>
<table width="600" border="0" cellspacing="2" cellpadding="0">
 <td><input type="button" value="你好JAVA!" onclick="Javascript:Check()"></td>
  <iframe id="display1" style="display:none">
<p>JAVA来了</p>
  </iframe>
</table>
</body>
</html>

解决方案 »

  1.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>JAVA</title>
    </head>
    <body>
    <script language="javascript">
    function Check()
    {
    var display1 = document.getElementById("display1");
    display1.style.display="";
    display1.reload(true);
    }
    </script>
    <table width="600" border="0" cellspacing="2" cellpadding="0">
     <td><input type="button" value="你好JAVA!" onclick="Javascript:Check()"></td>
      <iframe id="display1" style="display:none">
    <p>JAVA来了</p>
      </iframe>
    </table>
    </body>
    </html>
    getElementById注意大小写
      

  2.   

    <script type="text/javascript">
    function Check() {
        var display1 = document.getElementById("display1");  //getElementById() 大小写敏感
        display1.style.display = "";
        display1.contentWindow.document.location.reload(true);  //这一句要这么写
    }
    </script>
      

  3.   

    两位,改了也显示不出来啊,你们的浏览器可以显示吗?我这边是IE6和IE9的浏览器