当前位置: 首页 > 图文教程 > 网络编程 > Javascript > Javascript实例教程(11) 创建\"后退\"按钮

Javascript
form中限制文本字节数js代码
use jscript with List Proxy Server Information
use jscript List Installed Software
List Installed Software Features
List Information About the Binary Files Used by an Application
List the Codec Files on a Computer
List the UTC Time on a Computer
List Installed Hot Fixes
excel操作之Add Data to a Spreadsheet Cell
Add Formatted Data to a Spreadsheet
Apply an AutoFormat to an Excel Spreadsheet
JavaScript语法着色引擎(demo及打包文件下载)
类之Prototype.js学习
一款JavaScript压缩工具:X2JSCompactor
iis6+javascript Add an Extension File
jscript之Open an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
jscript之List Excel Color Values
去除图像或链接黑眼圈的两种方法总结
Add a Formatted Table to a Word Document

Javascript实例教程(11) 创建\"后退\"按钮


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-08-10   浏览: 476 ::
收藏到网摘: n/a

利用Javascript创建一个“后退”连接 在JavaScript中实现一个“后退”连接是相当容易的。这个“后退”连接的功能的作用就象网页中“后退”按钮一样,具体你可以使用以下代码:

<FORM>

<input type=button value="Go Back"

onClick="history.back(-1)" >

</FORM >

你仔细点就会发现,这段代码实际上是使用了history.back()函数而已。这点又是JavaScript功能函数强大的一个体现。其中history.back(-1)代表你要连接到的前面一张网页。如果你要往后回退5页,你可以使用history.back(-5)就搞定了。

我们翱翔于JavaScript中,我只能用一个字来表达我们的感受:“酷”。

点击此处去测试效果页面