javascript 刷新iframe内容

来源:互联网 发布:java时间转时间戳 编辑:程序博客网 时间:2024/05/21 08:40
<html>
<head>
     <title></title>
</head>
     <script language="JavaScript">
          function u1(u)
          {
            document.getElementById("iframeid").src=u;
          }
     </script>
     <body>
          <iframe  width="400" height="300" src="" name="iframename" id="iframeid"></iframe>
          <br>
          <input type="button" value="http://www.baidu.com/" onClick="u1('http://www.baidu.com/')">
          <input type="button" value="http://www.google.com/" onClick="u1('http://www.google.com/')">
          <input type="button" value="http://www.51js.com/" onClick="u1('http://www.51js.com/')">
     </body>
</html>
0 0
原创粉丝点击