jquery 統計統計子標簽的個數



本文實例講述了jQuery獲得子元素個數的方法。分享給大家供大家參考。具體分析如下:
//獲取id=div1下的子元素的個數
$('#div1').children().length;
//獲取id=div1下的span元素個數
$('#div1').children('span').length;
$(".site_show").children().length
18
$(".site_show").children("li").length
18

rf定位元素

Execute Javascript $("input[type='button']").click()
Comment Click Button css=input.login_iptBut
Click Element css=div.log_an > a > i

獲取產品名稱 return ${pr} ${pr} Get Element Attribute Pr@innerText
獲取產品數量 return ${qn} ${qn} Get Element Attribute Qn@innerText
Wait Until Page Contains ${text}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM