【发布时间】:2014-10-23 12:05:24
【问题描述】:
谁能告诉我为什么下面的代码不能为我正在创建的表格添加边框。 谢谢
<html>
<head>
<title>Exam5 review</title>
<style type="text/css">
table.center
{
border: 1px;
background-color: green;
width: 500px;
text-align: center;
margin-left:auto;
margin-right:auto;
}
</style>
<script type="text/javascript">
function parse()
{
document.open();
document.write('<table class="center">');
document.write('<tr><th>Course</th><th>Enrollment</th></tr>');
document.write("</table>");
}
</script>
</head>
<body onload="parse();">
</body>
</html>
【问题讨论】:
标签: javascript html css class