Js is empty or is not a quick solution to Object Problems
This article mainly describes how to quickly solve js null or not object problems. For more information, see.
1. added a parameter <script language = "javascript" defer = "defer">
2. 'null' is null or not an object:
<Script type = "text/javascript"> Add the defer = true attribute to it,
That is: <script type = "text/javascript" defer = true>
3. document. getElementById is null
Cause: var titab = document. getElementById ("titletab"); no object retrieved
Solution:
1. Add alert (titab) under the error statement to check whether a message box is displayed.
2. If no tab is displayed, check whether the <table> tag of "id = titletab" exists in the HTML code. (Be careful. A letter cannot be wrong)
3. if a tag exists, consider the location of the <script> code segment, remember to include a code similar to getElement. The <script> code segment must appear after the HTML Element. That is to say, you should put the <script> code segment after the