如何用js取出表格中的数据(急,在线等)。

zwhIvan 2003-06-04 10:21:02
<table id="thisSheet" width=122 align=center border=1 bordercolor=#44D33D cellpadding=1>
<tr><td colspan=2> </td></tr>
<tr><td colspan=2 align=center bgcolor="#FF9900"><font class=10v color=#00FF66> JavaScript?? </font></td></tr>

<tr>
<td width=14><img src="../../pic/em.gif" width="14" height="11" border=0></td>
<td>1</td>
</tr>
<tr>
<td><img src="../../pic/em.gif" width="14" height="11" border=0></td>
<td>2</td>
</tr>
</table>
怎么取到1和2?
thisSheet.rows(3).cells(1).values这样做哪里不对?
...全文
108 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
zwhIvan 2003-06-04
  • 打赏
  • 举报
回复
谢谢大家!日后还请多关照。
wssgwps 2003-06-04
  • 打赏
  • 举报
回复
Try:
function pp()
{
var coll=document.all.tags("TD");
alert(coll[2].innerHTML);
}
随风奔跑 2003-06-04
  • 打赏
  • 举报
回复
楼上的,好像不对把??
 你的两行代码都是一样的,怎么能一个得到纯文本,一个得到HTML代码了?
CHARGING 2003-06-04
  • 打赏
  • 举报
回复
thisSheet.rows(3).cells(1).innerText //得到纯文本;
thisSheet.rows(3).cells(1).innerText //得到HTML代码;
cpp2017 2003-06-04
  • 打赏
  • 举报
回复
alert(thisSheet.rows(3).cells(1).innerText);

87,994

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧