e mới học javascrip- cho e hỏi code lỗi chỗ nào. Khi click không xuất BCC ở vị trí id
<!DOCTYPE html>
<html>
<head>
<title> BT11 - Bảng cửu chương </title>
<meta charset="utf-8" />
</head>
<body>
<script type="text/javascript">
function bangcuuchuong()
{
var n = document.getElementById('txtNhap');
var BCC = document.getElementById('lblXuatBCC');
if (n == 2)
{
for ( var i = 1; i <= 10; i++)
{ document.write("<br>", " 2 x ", j, "=", +2 * j); }
}
}
</script>
<form>
<table border="1" style="border-collapse: collapse">
<caption style="font-weight:bold; font-size: 30px"> In bảng cửu chương </caption>
<tr>
<td> Nhập cửu chương: </td>
<td><input type="text" name="txtNhap" id="txtNhap"/> </td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" value="In" name="btnIn" onclick="lblXuatBCC.innerHTML = bangcuuchuong()" /> </td>
</tr>
<tr>
<td colspan="2" ><label id="lblXuatBCC"/> </td>
</tr>
</table>
</form>
</body>
</html>