<body> <button onclick="Elem_1(this)">Elem_1</button> <hr> <button onclick="Elem_2($(this))">Elem_2</button></body></html><script src="assets/js/package/jquery.js"></script><script> function Elem_1(el) { console.log(typeof el) console.log(el) } function Elem_2(el) { console.log(typeof el) console.log(el) }</script>结果:Elem_1: <button onclick="Elem_1(this)">Elem_1</button>Elem_1类型: object结果:Elem_2: [button, context: button]Elem_2类型: object它们的区别是什么...?
添加回答
举报
0/150
提交
取消