<input type="button" value="link" onclick="window.location.href='anotherpage.html';">
解决方案 »
- 可编辑div如何去掉用户通过粘贴复制带进来的html标签
- 请问如何用JQUERY获取相同ID的Qty的值?
- js中数组是引用传递 那为什么这里还是33 44 ???
- firefox下为什么span的innterHTML显示不出来、
- 请教各位大侠一个js操作word的问题!!!!
- 关于服务端返回JSON对象,却被解析为JSON字符串的问题,在线等!
- 当鼠标移到div上,随后按下键盘的->(向左移动键),div可以跟着移动,并可以获得x,y
- 请问怎么将该网页文字拷贝下来啊?★我急用呀
- javascript的confirm语句如何在C#里执行?
- js取xml返回值的时候chrome为什么不执行啊?
- 诶呀妈啊,这到底是咋回事啊?
- 散分大讨论:如果将CSDN上的亢主都集中到一个公司里面,会怎么样?
window.location.replace('anotherpage.html')
HTC file: test.htc<PUBLIC:COMPONENT>
<public:attach event=onclick onevent="doClick()" />
<PUBLIC:PROPERTY name="href"/>
</public:component>
<script>
function doClick()
{
window.location.href=element.href;
}
</script>HTML file:
<style>
.richButton{behavior:url(test.htc);}
</style>
...
<input class="richButton" href="http://www.sina.com.cn" value="新浪">
...
呵呵,这么做比较直观