2个回答
2014-12-24
展开全部
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="小白编辑部 and LittleWhite">
<title>小白编辑部 and LittleWhite</title>
<style type="text/css">
table {
margin: auto;
width: 300px;
border-collapse: collapse;
border: 1px solid black;
}
td {
border: 1px solid black;
text-align: center;
font: 20px/1.5 Consolas, 微软雅黑;
}
</style>
<script type="text/javascript">
onload = function ()
{
var first = document.getElementById('first');
var result = first.tBodies[0].rows[1].cells[0].children[0];
var x = result.tBodies[0].rows[0].cells[0].firstChild.nodeValue;
console.log(x);
}
</script>
</head>
<body>
<table id="first">
<tr><td>22</td></tr>
<tr>
<td><table>
<tr>
<td>dd</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |