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---------窗口位置(距上边屏幕距离)

  • 相关阅读:
    一个tomcat 增加多个端口
    转项目经理
    apicloud 解析
    七行代码搞定 任意数据库中的数据迁移
    语语
    农家设计图纸
    日期再总结
    X删除数据表的新用法
    c#中各类日期的计算方法,收藏
    IIS 7.5 高并发参数配置
  • 原文地址:https://www.cnblogs.com/liudong/p/1215630.html
Copyright © 2011-2022 走看看