自己总结了一下常用到的Button链接,代码如下:
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://hi.baidu.com/harryxue'" />
6.打开无边框的新窗口同时指向另一页
<input type="button" name="Submit2" value="确 定" class="btn" onclick="javascript:window.open('http://hi.baidu.com/harryxue','','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;" >
分享到:
相关推荐
mini2440 友善之臂开发板上用input_dev实现的button驱动程序和应用程序
button>标签 定义和用法 <button>标签定义一个按钮。 在button元素内部,您可以放置内容,比如文本或图像。这是该元素与使用input元素创建的按钮之间的不同之处。 <button>控件与<inputtype>相比,...
一、去掉边框: ...通常解决这样的bug最好的方法就是在button和input的标签外添加一个标签,然后将样式写在这个标签上,并且把button和input的默认样式都去除掉。 实现方式一:设置CSS: 复制代码
"wux-button": "../../dist/button/index" } 在 page.wxml 中使用组件 <wux-button size="small">Button</wux-button> <wux-button size="default">Button</wux-button> <wux-button size="large">Button</wux...
1.<INPUT onclick=document.all.WebBrowser.ExecWB(1,1) type=button value=打开 name=Button1> 2.<INPUT onclick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存为 name=Button2> 3.<INPUT onclick...
<Button /> <Button /> <Button /> <Button /> 这里礼物面板可以使用DialogFragment来替代我这里。 4:在activity中找到控件后就可以初始化礼物模块了。 a.礼物面板。 代码如下: 这里如果想...
BUTTON和INPUT的区别
点击编辑按钮时,文字切换成“保存”,身份证input保持始终不可修改状态(即禁用), 姓名input可以修改(即动态加载切换禁用/启用); 3.再次点击按钮文字切回“编辑”,所有input变为禁用状态。 以下是wxml部分 ...
/input></td> <td><input type=”text”></input></td> <td><input type=”button”></input></td> <td><input type=”text”></input></td> </tr> </table> </html> ...
voice-input-button2New version of voice input button using new interface of iflytek voice dictation (the stream version).基于讯飞新版语音听写(流式版) api 的语音输入按钮 vue 组件。使用 HTML 原生媒体...
1.链接到某页 <input type=”button” name=”Submit” value=”确 定” class=”btn” onclick=”location.href=’filename.html'” /> 2.返回(等同后退) <input name=”Submit2″ type=”button” class=...
透明Button 透明Button 透明Button 透明Button 透明Button 透明Button
为减少页面空间占用,将图片按钮放置在input输入框中,兼容火狐、谷歌和IE,图片自行替换
window.createObjectURL 上传图片,实现web预览
android 自定义各种风格button
input type="button" value="Q"/><input type="button" value="W"/><input type="button" value="E"/><input type="button" value="R"/><input type="button" value="T"/><input type=...
只有一个input元素。在线demo源码:https://github.com/dcsite/magic-input使用$ npm install magic-input你需要引入 dist/magic-input.css或者dist/magic-input.min.css 文件到你的工程或者HTML中。如果你使用...
closeButton.Click += new EventHandler(closeButton_Click); // 浮动窗口 flowForm.FormBorderStyle = FormBorderStyle.SizableToolWindow; //VS2008自带的窗体设计器进行设置窗体的边框。 flowForm....