0
我在頂點4.2從數據庫生成的樹: 我怎樣才能得到一個裏的Id cicked
<ul id="ltr">
<li id="00010" class="open"><a href="" style="" class=""><ins> </ins>Root</a>
<ul><li id="00110" class="open"><a href="" style="" class=""><ins> </ins>CHILD</a>
<ul><li id="00563" class="open"><a href="" style="" class=""><ins> </ins>CHILD</a>
<ul><li id="02057" class="leaf"><a href="" style="" class=""><ins> </ins>LAST CHILD</a></li>
</ul></li></ul>
</li>
</ul>
</li>
</ul>
我使用點擊功能選擇節點的ID,用類葉沒問題,但打開類選擇父母和父母的ID,我怎樣才能選擇點擊節點的ID?
$(".leaf").click(function(){
alert($(this).attr('id'));
});
$(".open").click(function(){
alert($(this).attr('id'));
});
好吧,it'這只是一個小例子,但apex生成一個數字爲ID的大樹,我只想選擇沒有選擇父節點id的點擊節點的編號 –
我的例子e也將使用數字編號。但不建議這樣做,因爲這可能會導致問題。 看到這個職位:http://stackoverflow.com/questions/5672903/can-i-have-a-div-with-id-as-number –
感謝它完美的作品,但我如何使用動態行動在apex 4.2中控制樹的選擇。 –