Javascript: Can't get element using getElementById [duplicate]
问题 This question already has answers here : Why does jQuery or a DOM method such as getElementById not find the element? (8 answers) Closed 3 years ago . Ok. I need fresh eyes because I'm still on this s***d problem for one hour! Here is my simple HTML code (testssio.html) that include javascript script: <!DOCTYPE html> <html> <head> <script type="text/javascript"> var ssio = document.getElementById('ssio'); ssio.html = "it finally works!"; </script> </head> <body> <div id="ssio"></div> </body>