input链接页面、打开新网页等等的具体实现
来源:互联网 发布:喜马拉雅fm for mac版 编辑:程序博客网 时间:2024/06/10 01:34
input可以链接到某页、返回、打开新网页、打开无边框的新窗口等等,本文整理了一些,感兴趣的朋友可以参考下
1.链接到某页
<input type="button" name="Submit" value="确 定" class="btn"
onclick="location.href='filename.html'" />
2.返回(等同后退)
<input name="Submit2" type="button" class="btn"
onclick="location.href='javascript:history.go(-1);'" value="返 回" />
3.打开新网页
<input type="button" name="Submit2" value="确 定" class="btn"
onclick="window.open('filename.html')" />
4.打开无边框的新窗口
<input type="button" name="Submit2" value="确 定" class="btn" onclick="javascript:window.open('filename.html','','width=720,height=500,resizable=yes,scrollbars=yes,status=no')" />
5.打开新网页同时指向另一页
<input type="button" name="Submit2" value="确 定" class="btn" onclick="window.open('filename.html');location.href='http://www.cxybl.com'" />
6.打开无边框的新窗口同时指向另一页
<input type="button" name="Submit2" value="确 定" class="btn" onclick="javascript:window.open('http://www.cxybl.com','','width=720,height=500,resizable=yes,scrollbars=yes,status=no'); window.location='filename.html';" />
7.点击按钮弹出确认alert窗口
<input type="button" name="Submit1" value="确定" class="btn"
onClick="alert('是否确认提交?');location.href= 'filename.html';return false;" >
方式二:
<input type="button" name="Submit2" value="确定" class="btn"
onClick="if (confirm('是否确认提交?'))location.href= 'filename.html';return false;" >
1.链接到某页
<input type="button" name="Submit" value="确 定" class="btn"
onclick="location.href='filename.html'" />
2.返回(等同后退)
<input name="Submit2" type="button" class="btn"
onclick="location.href='javascript:history.go(-1);'" value="返 回" />
3.打开新网页
<input type="button" name="Submit2" value="确 定" class="btn"
onclick="window.open('filename.html')" />
4.打开无边框的新窗口
<input type="button" name="Submit2" value="确 定" class="btn" onclick="javascript:window.open('filename.html','','width=720,height=500,resizable=yes,scrollbars=yes,status=no')" />
5.打开新网页同时指向另一页
<input type="button" name="Submit2" value="确 定" class="btn" onclick="window.open('filename.html');location.href='http://www.cxybl.com'" />
6.打开无边框的新窗口同时指向另一页
<input type="button" name="Submit2" value="确 定" class="btn" onclick="javascript:window.open('http://www.cxybl.com','','width=720,height=500,resizable=yes,scrollbars=yes,status=no'); window.location='filename.html';" />
7.点击按钮弹出确认alert窗口
unity3d培训http://www.unitymanual.com/
<input type="button" name="Submit1" value="确定" class="btn"
onClick="alert('是否确认提交?');location.href= 'filename.html';return false;" >
方式二:
<input type="button" name="Submit2" value="确定" class="btn"
onClick="if (confirm('是否确认提交?'))location.href= 'filename.html';return false;" >
0 0
- input链接页面、打开新网页等等的具体实现
- Web开发之input链接页面、打开新网页等等的具体实现
- js链接 打开新的页面
- 阻止360浏览器拖拽链接打开新的页面
- jsp页面怎样实现重新打开一个新的页面
- javaFx如何链接外部网页(从javafx内部打开新的网页)
- 打开链接网页的小技巧,就是要链接网页已经打开时就不打开第二个同样的页面拉!(网页小技巧)
- jQuery,实现想弹出什么,弹出什么(弹出提示、弹出一个新的页面等等)
- C# WinForm如何实现,链接到新网页的方法
- C#.Net 打开新网页的五种实现方法
- 打开一个新的网页
- jQuery禁用a和input 打开链接页面
- 如何在WebBrowser打开的网页链接后直接在WebBrowser打开而不是新弹出一个IE窗口来打开
- 在WebBrowser控件打开的网页链接后直接打开而不新弹出IE窗口来打开
- Windows XP下IE网页无法正常显示与无法打开新链接的部分解决办法
- 谷歌浏览器怎么拖动链接打开一个新的标签网页啊?
- 打开新的页面.HTML
- 网页上的所有链接页面都在新窗口打开的技巧
- 常用-名词解释
- 创投恩怨情仇录
- C语言内存对齐详解(3)
- font
- HPUX MC/SG扩容简单步骤(OPS环境添加新共享VG)
- input链接页面、打开新网页等等的具体实现
- 求全是1的最大矩阵面积 Maximal Rectangle @LeetCode
- 启动webApplicationContext的方式
- cmmi--软件王者之道
- [转载] 我叫李小帅
- Linux下查看文件和文件夹大小
- mysql乱码问题
- 获取3个数组不重复的值的具体实现
- 有关乱码的问题(出现??????的情况,两次解码的原因)