jQuery,获取具有元素名称的元素以给定字符串开头 [英] Jquery, get elements with element name starts with a giving string
本文介绍了jQuery,获取具有元素名称的元素以给定字符串开头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用jquery获取名称以'productElement'开头的所有输入文本元素
How using jquery get all input text elements whith a name starts with 'productElement'
推荐答案
您是use属性 :
选择具有指定属性并带有值的元素完全以给定的字符串开头.
Selects elements that have the specified attribute with a value beginning exactly with a given string.
$('input[name^="productElement"]')
这篇关于jQuery,获取具有元素名称的元素以给定字符串开头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文