Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用jquery提取标记的数量_Jquery - Fatal编程技术网

使用jquery提取标记的数量

使用jquery提取标记的数量,jquery,Jquery,我正在开发一个企业应用程序,在这个应用程序中,我可以在表中显示多个链接,也可以根据数据不显示链接 链接显示在表中,后面有以下代码: <td class="Row"> <span id='s_3_2_14_0' > <a href='JavaScript:SWETargetGotoURL("/eservice_enu/start.swe?SWECmd=GotoView&SWEView=Active+PO+Serial+View&SWEP

我正在开发一个企业应用程序,在这个应用程序中,我可以在表中显示多个链接,也可以根据数据不显示链接

链接显示在表中,后面有以下代码:

<td  class="Row">
  <span  id='s_3_2_14_0' >
    <a href='JavaScript:SWETargetGotoURL("/eservice_enu/start.swe?SWECmd=GotoView&SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet&SWEPostnRowId=1-KPBLOZ","_self")'>2001103009</a>
  </span>
</td>
我尝试了以下表达式,但它返回0:

$('a[href*="SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet"').length;
你错过了一次机会

$('a[href*="SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet"]').length;
你错过了一次机会

$('a[href*="SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet"]').length;

选择器中缺少结尾]

$('a[href*="SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet"]').length;

选择器中缺少结尾]

$('a[href*="SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet"]').length;
试试这个

    $().ready(function() {
       $('span a[href*="SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet"]').length;
       /* In order to check the count you can use an alert */       
       alert($('span a[href*="SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet"]').length);
    });
试试这个

    $().ready(function() {
       $('span a[href*="SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet"]').length;
       /* In order to check the count you can use an alert */       
       alert($('span a[href*="SWEView=Active+PO+Serial+View&SWEPostnApplet=Purchase+Order+List+Applet"]').length);
    });

哦。。这样愚蠢的错误。在我添加]@user1017268:NP后,它开始工作。有时候我们都需要一双眼睛!哦。。这样愚蠢的错误。在我添加]@user1017268:NP后,它开始工作。有时候我们都需要一双眼睛!只是注意到你以同样的答案击败了我…只是注意到你以同样的答案击败了我。。。