按钮点击事件

按钮点击事件:

单独添加一个链接,实现跳转:
<input type="button" value="我是一个按钮"
onclick="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="我是一个按钮" onclick=javascrtpt:jump()>
posted @ 2018-04-26 14:30  一个九  阅读(158)  评论(0编辑  收藏  举报