Hi all. Here is my code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
; "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
</head>
<body>
<div id="divmenutable"></div>
<script type="text/javascript">
$(document).ready(function() {
var menuTable = $("<table><table>").addClass("table_menu");
var menuRow = $("<tr></tr>");
var menuCol = $("<td>awef</td>");
menuRow.append(menuCol);
menuTable.append(menuRow);
$("#divmenutable").append(menuTable);
});
</script>
</body>
</html>
The result, div add table twice. I dont know why. My real code is to use 'for' loop to add data to table. I have minimized my code to show the problem. thank for your help.