Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 Jquery 获取 gridview 行数,但行数必须仅是那些在侧网格中具有 css 类名称“R1”或“R2”的行。
请建议我如何获得它
试试这个:
var len = $('#gvCartItems').find('.R1, .R2').length;
var a = $('#gvCartItems .r1').length; var b = $('#gvCartItems .r2').length; var c = a+b; alert(c);
是我想的一种方式。