解决方案 »

  1.   

    <!DOCTYPE html>
    <html>
    <head>
        <title></title>
        <meta charset="utf-8" />
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0-beta1.js"></script>
         <script type="text/javascript">
           $(function(){
            var f = $("td").filter(function(index) {
                return $(this).html() == 'checkPointCode';
            });
            console.log(f)
           })
         </script>
    </head>
    <body>
    <table><tr><td>checkPointCode</td><td>checkPointCodes</td></tr><tr><td>checkPointCode</td><td>aaaaa</td></tr></table>
    </body>
    </html>
      

  2.   

    你确定
    $("tr:contains('checkPointCode')") 
    可以找到包含checkPointCode的td 没更高了,当然 $("td")  自己改下$("#id").find("td")
    $(function(){
            var f = $("td").filter(function(index) {
                return this.innerText == 'checkPointCode';
            });
            console.log(f)
           })
      

  3.   

    文本要用text()去找   谢谢
      

  4.   

    本帖最后由 showbo 于 2014-05-06 12:15:19 编辑