input标签type=button时实现跳转到指定页面或操作

- 实现指定页面跳转

<input type="button" value="我是一个按钮" 
"javascrtpt:window.location.href='http://blog.sina.com.cn/mleavs'">

- 实现跳转至某函数

<script>
function jump(){
 window.location.href="http://blog.sina.com.cn/mleavs";
}
</script>

……

<input type="button" value="我是一个按钮" “javascrtpt:jump()”>

猜你喜欢

转载自blog.csdn.net/weixin_38121168/article/details/89382383