用window.location和window.open做链接的区别
来源:互联网 发布:windows内核实验教程 编辑:程序博客网 时间:2024/04/30 08:47
关键字:window.location window.open()
在给按钮、表格、单元格、下拉列表和DIV等做链接时一般都要用Javascript来完成,和做普通链接一样,可能我们需要让链接页面在当前窗口打开,也可能需要在新窗口打开,这时我们就可以使用下面两项之一来完成:
window.open 用来打开新窗口
window.location 用来替换当前页,也就是重新定位当前页
window.location 用来替换当前页,也就是重新定位当前页
我们可以用以下来个实例来测试一下。
<input type="button" value="新窗口打开" onclick="window.open('http://www.zhousl.com/')">
<input type="button" value="当前页打开" onclick="window.location='http://www.zhousl.com/'">
- 用window.location和window.open做链接的区别
- 用window.location和window.open做链接的区别
- 用window.location和window.open做链接的区别
- 用window.location和window.open做链接的区别
- window.location和window.open做链接的区别
- window.location和window.open()的区别
- window.location.href 和 window.open 的区别
- window.location和window.open的区别[JavaScript]
- jquery 打开页面window.location和window.open的区别
- window.location和window.open的区别解析
- javascript 打开页面window.location和window.open的区别
- window.open和window.location.href的区别
- window.open和location.href区别
- 发现的window.open() 和location.href的区别。
- window.open 与openwindow.location的区别
- javascript中window.open()与window.location.href的区别
- javascript中window.open()与window.location.href的区别
- javascript中window.open()与window.location.href的区别
- ASP.NET中执行URL重写
- 高性能高并发服务器架构文章大全.doc
- ARM Linux根文件系统(Root Filesystem)的制作
- Delphi 中DLL的调用技巧
- 解决在ssh或telnet等方式进行远程管理遇到的乱码问题
- 用window.location和window.open做链接的区别
- API函数大全
- gridview中获取主键的值(GridView1_RowCommand,GridView1_PageIndexChanging,GridView1_RowDeleting.....)
- FindWindow和FindWindowEX的语法和用法
- 软件三输
- 用JFreeChart增强JSP报表的用户体验(2)
- 每天进步1%-自我管理 11月04日
- 设计模式(三)之模版方法模式(Template method Pattern)
- Flex背景图像实现类似于html平铺拉伸