jQuery选择所有以id开头的表

ros*_*ale 5 html javascript jquery javascript-events

我想用jquery选择id以相同句子开头的所有表.

这就是我的意思:

<table id="Tab_01">
    <tr>
        <td>....
    <tr>
    ....
</table>

<table id="Tab_02">
    <tr>
        <td>....
    <tr>
    ....
</table>
<table id="Tab_03">
    <tr>
        <td>....
    <tr>
    ....
</table>
<table id="xyz">
    <tr>
        <td>....
    <tr>
    ....
</table>
Run Code Online (Sandbox Code Playgroud)

我需要的是选择以"Tab_"开头的表而不是id ="xyz"的表

我想使用此代码与此插件进行类似的导航:http: //projects.allmarkedup.com/jquery_evtpaginate/demo_basic.html

有谁能帮帮我???

非常感谢.

亚历山德罗

Ken*_*ler 11

试试这个:

$('table[id^=Tab_]')
Run Code Online (Sandbox Code Playgroud)