document.getElementById()
是document
具有的屬性和方法的對象?
如果是,是getElementById()
這個對象上的一個方法嗎?
如果否,請考慮document
和getElementById
是什麼?
document.getElementById()
是document
具有的屬性和方法的對象?
如果是,是getElementById()
這個對象上的一個方法嗎?
如果否,請考慮document
和getElementById
是什麼?
在瀏覽器中,document
是Document
的一個實例。 document instanceof Document
=>true
。
它代表整個HTML頁面。 和document
是window
的財產。 window.document === document
=>true
。
因此它可以用作全局對象。
你想確定什麼? – guest271314
是:https://developer.mozilla.org/en-US/docs/Web/API/Document –