目前頁面是通過velocity的for循環(huán)把后臺傳過來的list一行一行的遍歷顯示在表格里,現(xiàn)在我想實現(xiàn)點擊一個td表格的文字內(nèi)容,獲取到所點擊的td表格的內(nèi)容帶著內(nèi)容跳到后臺處理,目前進行到#foreach($elem in $allElems)<tr> <td><a href="javascript:xxx(this)">$elem.屬性1</a></td> <td><a href="javascript:xxx(this)">$elem.屬性2</a></td> <td><a href="javascript:xxx(this)">$elem.屬性3</a></td></tr>#end了,我想問下,怎么能在點擊的時候通過原生js或jQuery獲取到所點擊的表格的內(nèi)容?
js或jQuery如何獲取點擊的td表格的內(nèi)容?(td內(nèi)容是通過velocity循環(huán)出來的)
陪伴而非守候
2018-08-10 09:09:31