解决思路: 
按钮属于控件级的对象,优先级比较高,所以不能像图片或文本一样直接加链接,只能通过按钮的单击事件调用脚本的方式来实现。 

具体步骤: 
    1.在原窗口打开链接 

    <input type="button"  value="闪吧" onClick="location='http://www.flash8.net'"> 
    <button onClick="location.href='http://www.flash8.net'">闪吧</button> 
    <form action="http://www.flash8.net"><input type="submit" value="打开链接"></form> 

    2.在新窗口中打开链接 

    <input type="button"  value="闪吧" onClick="window.open('http://www.flash8.net')"> 
    <button onClick="window.open('http://www.flash8.net')">闪吧</button> 
    <form action="http://www.flash8.net" target="_blank"><input type="submit" value="打开链接"></form> 

注意:onClick调用的代码里的引号在只有一重时可以单双嵌套,超过两重就必须用 \ 号转义且转义的引号必须跟里层的引号一致,
也就是说里层引号要么全单,要么全双,不能混着来。
如: 

<button onClick="this.innerHTML='<font color=\'red\'>http://www.flash8.net</font>'">闪吧</button> 

或 

<button onClick='this.innerHTML="<font color=\"red\">http://www.flash8.net</font>"'>闪吧</button> 

而下面都是错误的写法: 
 
<button onClick="this.innerHTML='<font color='red'>http://www.flash8.net</font>'">闪吧</button> 
 
<button onClick="this.innerHTML='<font color="red">http://www.flash8.net</font>'">闪吧</button> 
 
<button onClick="this.innerHTML='<font color=\"red\">http://www.flash8.net</font>'">闪吧</button> 

提示:大部分属于window或document对象的方法和属性都可以省略前缀window或document,
比如说本例中的location.href(location.href又可以简写为location,因为location的默认对象为href)
就是window.location.href或document.location.href的省略式写法。 
技巧:本例中还可以用下面的方法来代替location.href 
location.replace(url) 
location.assign(url) 
navigate(url) 

特别提示 
第一步中的代码运行后,单击按钮将跳转到链接目标。而第二步的在单击按钮后将在新窗口中打开链接。 

特别说明
本例主要是通过用onClick捕获用户在按钮上的单击事件,然后调用location对象的href方法或window对象的open方法来打开链接。
另外一个技巧是通过提交表单来实现链接功能,按钮必须是type=submit类型的按钮,表单的action值就是链接目标,
target 值就是链接打开的目标方式。