[英]How can I find and select all elements which have data attribute start with specific word with using jquery?
[英]Using data attributes and jQuery how can I select elements by data attribute name AND data attribute value
我需要通过数据属性名称和数据属性值选择元素。
类似的东西(但显然,它不起作用)
for(var i=0; i<x.length; i++){
var y = $('.my-class').attr('data-id', i); //trying to select here
y.html('input' + i);
}
不知道该如何实现,请帮忙! :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.