◆加入收藏夹 | |
说 明 | 点击即可把你的网站添加到浏览器的收藏菜单下 |
代 码 | <span style="CURSOR: hand" onClick="window.external.addFavorite('https://www.jb51.net','脚本之家')" title="脚本之家">收藏本站</span> |
◆自动刷新网页 | |
说 明 | 自动刷新网页 在HTML的与之间加入下面这段代码,则在5分钟之后正在浏览的页面将会自动变为target.html这一页。代码中300为刷新的延迟时间,以秒为单位。targer.html为你想转向的目标页,若为本页则为自动刷新本页。 |
代 码 | <meta http-equiv="refresh" content="300; url=target.html"> |
◆刷新本页 | |
说 明 | 点击即可刷新本页。 |
代 码 | <a href="javascript:location.reload()" target="_self">刷新</a> |
◆返回到上一页 | |
说 明 | 点击即可返回到上一页面。 |
代 码 | <a href="javascript:history.back(-1)">返回上一页</a> |
◆跳出小窗口 | |
说 明 | 在打开有下面这段代码的页面时将会跳出一个468x60大小的小窗口。“window.html”为跳出的小窗口里所要显示的网页。toolbar、status、menubar、scrollbars、设置小窗口的工具栏、状态栏、菜单栏及滚动条的有无,resizable设置是否可让浏览者改变小窗口大小,width、height设置小窗口的宽度以及高度。(不过这样的小窗口一般是不受欢迎的哦!) |
代 码 | <script language="JavaScript"> window.open("window.html","www_helpor_net","toolbar=no, status=no,menubar=no, scrollbars=no,resizable=no,width=468,height=60,left=200,top=50"); </script> |
◆状态栏里的动态欢迎语 | |
说 明 | 浏览器的状态栏里出现一个字接一个字往左跑的欢迎语! |
代 码 | <script language="JavaScript"> <!-- function statusMessageObject(p,d) { this.msg = MESSAGE this.out = " " this.pos = POSITION this.delay = DELAY this.i = 0 this.reset = clearMessage } function clearMessage() { this.pos = POSITION } var POSITION = 100 var DELAY = 5 var MESSAGE = "欢迎光临! Welcome to WWW.jb51.net " var scroll = new statusMessageObject() function scroller() { for (scroll.i = 0; scroll.i < scroll.pos; scroll.i++) { scroll.out += " " } if (scroll.pos >= 0) scroll.out += scroll.msg else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length) window.status = scroll.out scroll.out = " " scroll.pos-- if (scroll.pos < -(scroll.msg.length)) { scroll.reset() } setTimeout ('scroller()',scroll.delay) } function snapIn(jumpSpaces,position) { var msg = scroll.msg var out = "" for (var i=0; i<position; i++) {out += msg.charAt(i)} for (i=1;i<jumpSpaces;i++) {out += " "} out += msg.charAt(position) window.status = out if (jumpSpaces <= 1) { position++ if (msg.charAt(position) == ' ') {position++ } jumpSpaces = 100-position } else if (jumpSpaces > 3) {jumpSpaces *= .75} else {jumpSpaces--} if (position != msg.length) { var cmd = "snapIn(" + jumpSpaces + "," + position + ")"; scrollID = window.setTimeout(cmd,scroll.delay); } else { window.status="" jumpSpaces=0 position=0 cmd = "snapIn(" + jumpSpaces + "," + position + ")"; scrollID = window.setTimeout(cmd,scroll.delay); return false } return true } snapIn(100,0); // --> </script> |
findmnt命令用于列出Linux中已挂载的文件系统。该命令将在/etc/fstab, /etc/mtab...
一、队列 ① 队列实现源码分析 在源码中搜索 dispatch_queue_create 关键字可以...
Kubernetes 已经成为了集群调度领域炙手可热的开源项目之一。用 Kubernetes 来部...
2021 年,人们比以前的任何时候都更有理由来爱上 Linux。在这个系列,我会分享 2...
vue中监听滚动事件,然后对其进行事件处理,一般有:1. 滚动到顶部吸附; 2. 根...
在上一篇” 拥抱.NET Core系列:MemoryCache 初识 ”中我们基本了解了缓存的添加...
github现在已经经常用了,但是经常遇到下面的问题 比如:从一个项目A中fork了一...
Ajax 已经很流行一阵子了,现在谈 Ajax 觉得有点老土,-_____-```。目前所谓的 W...
系列文章目录 文章目录 系列文章目录 前言 一、数据类型介绍 1.类型的基本归类 1...
一、前世今生 .NET诞生以来,程序集的动态加载和卸载都是一个Hack的技术,之前的...