<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
它们的区别是什么...?
婷婷同学_
相关分类