![](/img/trans.png)
[英]Javascript HTML Table get first column's cell value based on another cell's onclick
[英]Javascript: Get cell's column id
例如:
我想完成以下偽代碼的工作
<scipt>
var intCol = document.getElementById('x').column
</scipt>
有沒有辦法做到這一點?
為什么不能使用cellIndex
?
在此頁:
$('.postcell')[0].cellIndex
> 1
$('.votecell')[0].cellIndex
> 0
我知道人們討厭W3School,但是他們確實提供了很好的基本數據集: http : //www.w3schools.com/jsref/prop_tabledata_cellindex.asp
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.