js——網頁全屏顯示

          程序代碼如下:

          這段程序放在<body>與</body>之間
          <script>
          <!--
          function windowopen(){
          var target="http://zhoucaiqi.51.net"
          newwindow
          =window.open("","","scrollbars")
          if (document.all){
          newwindow.moveTo(
          0,0)
          newwindow.resizeTo(screen.width,screen.height)
          }
          newwindow.location
          =target
          }
          //-->
          </script>
          <form>
          <input type="button" onClick="windowopen()" value="全屏顯示" name="button">
          </form>
           
           程序講解:
             


          function windowopen()
          定義一個函數。
          { var target="http://zhoucaiqi.51.net"
          設置一個字符串。
          newwindow=window.open("","","
          scrollbars")
          打開一個新窗口。
          if (document.all)
          { newwindow.moveTo(0,0)
          新窗口從(0,0)位置開始顯示。
          newwindow.resizeTo
          (screen.width,screen.height) }
          新窗口的尺寸是整個屏幕的寬,整個屏幕的高。
          newwindow.location=target 顯示target指定的鏈接地址。
          <input type="button" onClick="windowopen()" value="全屏顯示" name="button"> 插入一個按鈕,擊它的時候調用windowopen()函數。

          posted on 2009-04-16 13:44 胡鵬 閱讀(9225) 評論(0)  編輯  收藏 所屬分類: js,html,css

          導航

          <2009年4月>
          2930311234
          567891011
          12131415161718
          19202122232425
          262728293012
          3456789

          統計

          常用鏈接

          留言簿(3)

          隨筆分類

          隨筆檔案

          agile

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 拜城县| 江永县| 会泽县| 郎溪县| 澄江县| 固始县| 玛沁县| 池州市| 黑水县| 图片| 大同县| 从化市| 湘乡市| 县级市| 昆山市| 襄汾县| 武安市| 双江| 自治县| 临清市| 乌拉特后旗| 冀州市| 堆龙德庆县| 定结县| 阳谷县| 收藏| 忻城县| 丹江口市| 余姚市| 色达县| 读书| 雷州市| 琼中| 嘉兴市| 苍山县| 靖远县| 调兵山市| 岳阳县| 巴楚县| 灵武市| 澳门|