document.write 里加表格

[复制链接]
查看11 | 回复2 | 2015-10-25 22:44:28 | 显示全部楼层 |阅读模式
无标题页td{border:1pxsolid#000000;}


回复

使用道具 举报

千问 | 2015-10-25 22:44:28 | 显示全部楼层
可以把代码放在一行,如果你想让结构清楚,可以这样写document.write("") document.write("") document.write("你好,谢谢你了") document.write("你好,谢谢你了") document.write("你好,谢谢你了") document.write("你好,谢谢你了") document.write("") document.write("") document.write("你好,谢谢你了") document.write("你好,谢谢你了") document.write("你好,谢谢你了") document.write("你好,谢谢你了") document.write("") document.write("") document.write("你好,谢谢你了") document.write("你好,谢谢你了") document.write("你好,谢谢你了") document.write("你好,谢谢你了") document.write("") document.write("")
回复

使用道具 举报

千问 | 2015-10-25 22:44:28 | 显示全部楼层
document.write本身可以添加多行多列……楼主问题应该是在document.write("....")中使用了换行,导致无法显示。解决办法一是像一楼一样拆分为多个document.write解决办法二是在换行处添加 \ ,如document.write("\
a[/td]b
cd
");
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行