Đây là tài liệu HTML ngắn gọn của tôi.
Tại sao Bảng điều khiển Chrome nhận thấy lỗi này:
"Uncaught TypeError: Không thể gọi phương thức 'appendChild' của
null"?
<html>
<head>
    <title>Javascript Tests</title>
    <script type="text/javascript">
        var mySpan = document.createElement("span");
        mySpan.innerHTML = "This is my span!";
        mySpan.style.color = "red";
        document.body.appendChild(mySpan);
        alert("Why does the span change after this alert? Not before?");
    </script>
</head>
<body>
</body>
</html>