0
在#main DIV表假设具有ID foo_userId其表示用户内容所具有的ID用户idjQuery的复杂选择器:层次字符串变量
我必须选择与用户id 1234表具有给定id作为可变
<div id="main">
<table id="foo_1234_m"></table> //select this
<table id="f0006458_m"></table>
<table id="f00_n"></table>
<table id="foo_9999_k"></table>
</div>
$('div#main>table#foo_1234_m')
// foo : string , 1234 : variable , m variable
//////////i'm trying something like :
var userId='1234'
var tableID='foo_' + userId // from this
$("div#main>table[id^='foo_1234']") // how to make this