各位客官看一看啊!
一个小问题
button 标签中onclick 事件 点击时 怎么调用一个jquery 的方法?(button 标签是一个jsp,jquery 是一个.js文件)
这是按钮
<button class="btn btn-info" type="button" style="height: 60px" onclick="selectZtree()">管理用户/角色</button>
这是js 文件中的方法
var selectZtree = function(event) {
console.log(event);
console.log(this);
}
用上面的这种写法就会报错:Uncaught ReferenceError: selectZtree is not defined
at HTMLButtonElement.onclick (repworkEdit:1)
求助!在线等!