Document.getElementById (..), why the value you get here is null (see figure)

The document.write above

has been written out and the page is gone.


do not use document.write, to use console.log, to check the results in developer tools


it is best to use console.log ()


1.js code is best placed in front of the body closing tag, that is, at the bottom of body,
2. document.getElementById (""). Write () will redraw the entire page. " You can choose to use document.getElementById (""). InnerHTML () ) instead of document.getElementById (""). Write () output,


change to console.log ()


this redrawing


DOM tree is gone.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1beb963-31a83.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1beb963-31a83.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?