HTML中JS利用document.write生成表格问题
代码:<script>document.write("<b>The Screen</b><br>"); ...
代码:<script> document.write("<b>The Screen</b><br>"); document.write("<table border=2>"); document.write("<tr><th>Screen Property</th><th>Value</th></tr>"); document.write("<tr><td>Height</td><td>",screen.height ,"</td></tr>"); document.write("<tr><td>Available Height</td><td>", screen.availHeight,"</td></tr>"); document.write("<tr><td>Width</td><td>",screen.width,"</td></tr>"); document.write("<tr><td>Available Width</td><td>", screen.availWidth,"</td></tr>"); document.write("<tr><td>Color Depth</td><td>", screen.colorDepth,"</td></tr>"); document.write("</table>");</script>为什么生成的不是表格形式呢?
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询