Operation of document.getElementById() method in HTML

Reprinted from: http://blog.csdn.net/pyffcwj/article/details/7240232/

obj = document.getElementById("cc")

where: obj is an object (Object)

   id is a string (String)

It means: by selecting the id:cc in the page, to return its first object (the object is said to have length and value attributes) If it is not returned, it will be null

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325565252&siteId=291194637