zoukankan      html  css  js  c++  java
  • javascript小技巧【待续】

    (1)点击按钮,让窗口刷新
    <SCRIPT LANGUAGE="JavaScript">
    function displayAlert() {
      this.location.reload();//refresh
    window.close();//close
    }
    </SCRIPT>
    <BODY>
    <FORM>
    Click the button on the left for a reminder in 5 seconds;
    click the button on the right to cancel the reminder before
    it is displayed.
    <P>
    <INPUT TYPE="button" VALUE="5-second reminder"
       NAME="remind_button"
       onClick="timerID=setTimeout('displayAlert()',3000)">
    <INPUT TYPE="button" VALUE="Clear the 5-second reminder"
       NAME="remind_disable_button"
       onClick="clearTimeout(timerID)">
    </FORM>
    </BODY>

    (2)让窗体的大小受到控制,并且没有工具栏

    <script language="javascript">
       <!--
          focus();
          resizeTo(510, 358);
      /-->
      </script>



    window.open("tg.htm","_blank","toolbar=no, status=no,menubar=no, scrollbars=no,resizable=no,width=360,height=360,left=20,top=50");

    tg.htm-----要找开的网页地址
    _blank----打开的新窗口名称
    toolbar----工具栏
    status-----状态栏
    menubar--菜单栏
    scrollbars-滚动条
    resizable--是否可以改变窗口大小
    width-------窗口宽
    height-----窗口高
    left---------窗口位置(距左边屏幕距离)
    top---------窗口位置(距上边屏幕距离)

  • 相关阅读:
    从输入url到浏览器加载过程(回答此问题的一个主干脉络)
    如何减少回流,重绘
    mac常用启动各种服务的命令
    分布式笔记搬迁
    JAVA基础
    EasyExcel引入
    mac 好用软件地址存储
    2018/4/11
    2018/04/04
    jdk各版本
  • 原文地址:https://www.cnblogs.com/liudong/p/1215630.html
Copyright © 2011-2022 走看看