使用导航按钮代替导航链接 [英] using NAVIGATION BUTTONS in place of navigation links

查看:121
本文介绍了使用导航按钮代替导航链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站设计中遇到问题.我无法使用导航按钮.如何在任何html网页中使用导航按钮代替导航链接

I had a problem in website design.I am not able to use navigation buttons.How to use navigation buttons instead of navigation links in any html webpage

推荐答案

在按钮上单击使用javascript方法window.open()
Use javascript method window.open() on a button click


例如,在您的HTML页面中插入以下代码:
For example, inset this code in your HTML page:
<form method="link" action="http://www.codeproject.com/Questions/ask.aspx">
   <input type="submit" value="Click to navigate…"></input>
</form>



仅用于测试,如果这是所有HTML页面代码,它将起作用.单击该按钮,然后查看其工作原理.

此方法比使用JavaScript的方法更通用,因为即使在浏览器中禁用脚本,它也可以工作,这总是更好.

—SA



Just for a test, it will work if this is all of the HTML page code. Click the button and see how it works.

This method is more universal than the one using JavaScript, as it can work even of scripting is disabled in the browser, which is always better.

—SA


这篇关于使用导航按钮代替导航链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆