请各位同志来看一下吧
问题描述:
一个按钮我绑定了一个点击判断事件,要怎么才能使事件判断正确后点击跳转页面
答
function test(){
if(a===1){
window.location.href = url
}
}