关于原生document.getElementById("a")与$("#a")[0]

document.getElementById("a")表示dom元素,

$("#a")[0]表示jquery元素,

document.getElementById("a")可以等价于$("#a")[0]

猜你喜欢

转载自blog.csdn.net/sudaofeng520/article/details/80497069