<button name="19">btn</button>
<script>
$("button").on("click",function () {
alert(typeof $(this).attr("name")); //返回的是字符串
});
</script>
<button name=19>btn</button>
<script>
$("button").on("click",function () {
alert(typeof $(this).attr("name")); //返回的是字符串
});
</script>
网友评论