jQuery('td[class=bgoff]').each(function() { ... no apply selector to "this" only我正在处理html中的表格数据,并试图解析每个TD的内容(它们不是唯一可识别的)。使用XPath,我可以将"this“的路径放在附加选择的前面。
我如何使用jQuery实现这一点?
下面是推堆栈的jquery源代码,请看一看: // Build a new jQuery matched element setvar ret = jQuery.merge( this.constructor(), elems );
// Add the old object onto the stack (as a reference有人能给我一个提示吗,它绝对不是javascript的