使用 jQuery 将文本添加到表格数据单元格
为什么这段代码:
row.append($("<td></td>").text("someText"));
...不起作用,我该如何修复它?
Why this code:
row.append($("<td></td>").text("someText"));
...isn't working, and how can I fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
代码运行良好,如工作演示所示。将 /edit 添加到 URL 以查看代码。在 Firefox 3.5 和 IE 6 中测试
此外,您可能会考虑将单元格元素的创建缩短为
The code works fine, as demonstrated with this Working Demo. Add /edit to the URL to see the code. Tested in Firefox 3.5 and IE 6
Also, you might consider shortening the creation of the cell element to