Get value of List Item with jQuery(使用 jQuery 获取列表项的值)
问题描述
如何用jQuery获取列表项onClick
事件的值和索引?
例如:
How to get value and index of list item onClick
event with jQuery?
For example:
推荐答案
结合使用.index()
和 .text()
(或 .html()
,如果你愿意):
Combine the use of .index()
and .text()
(or .html()
, if you wish):
这篇关于使用 jQuery 获取列表项的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!