1. Added a parameter <script language="javascript" defer="defer">
2. 'null' is empty or not an object:
<script type="text/javascript"> Try adding a defer=true attribute inside it.
That is: <script type="text/javascript" defer=true>
3. document.getElementById is null
Reason: var titab=document.getElementById("titletab"); did not get the object
Solution:
1. Add alert(titab); debugging statement below the error statement to see if a message box pops up.
2. If it does not pop up, check whether there is a <table> tag with "id=titletab" in the HTML code (be careful, there cannot be a single letter wrong)
3. If the tag exists, then consider the location of the <script> code segment. Remember that the <script> code segment containing code similar to getElement must appear after the HTML Element. That is to say, you put the <script> code segment in <html> After the tag then try