来自https://zhidao.baidu.com/question/539885993.html
按钮,这可是一个功能强大的东西,想跳转,想触发函数等都可以滴。
给你几个例子吧,
单独添加一个链接,实现跳转:
<input type="button" value="我是一个按钮"
οnclick="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="我是一个按钮" οnclick=javascrtpt:jump()>