jquery中each方法示例和常用选择器_jquery
来源:动视网
责编:小采
时间:2020-11-27 21:25:09
jquery中each方法示例和常用选择器_jquery
jquery中each方法示例和常用选择器_jquery: $(function() { //alert($(div).text()); //对数组元素使用匿名函数进行逐个处理。 $(div).each(function(key, value) { //alert(key+value); // alert($(value).text()); alert(this.innerHTM
导读jquery中each方法示例和常用选择器_jquery: $(function() { //alert($(div).text()); //对数组元素使用匿名函数进行逐个处理。 $(div).each(function(key, value) { //alert(key+value); // alert($(value).text()); alert(this.innerHTM

常用选择器:
1.类:$(".error").
2.id:$("#daLong").
3.标签:$("div").
4.属性:$("div[name=apple]").
5.表单:$("input:checked").
jquery中each方法示例和常用选择器_jquery
jquery中each方法示例和常用选择器_jquery: $(function() { //alert($(div).text()); //对数组元素使用匿名函数进行逐个处理。 $(div).each(function(key, value) { //alert(key+value); // alert($(value).text()); alert(this.innerHTM