且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Jquery $() - 它返回什么,什么是 $()[0]?

更新时间:2023-02-19 23:07:33

$() 返回基于选择器的元素集合.所以$('.help') 将返回所有具有.help 类的元素.$('.help')[0] 会给你第一个元素.

$() returns a collection of elements based on the selector. So $('.help') would return all elements with a class of .help. $('.help')[0] would give you the first element.