阅读背景:

对于DOM中尚未[还]的元素,请使用getElementById吗?

来源:互联网 

As far as I know document.getElementById('myId') will only look for HTML elements that are already in the document. Let's say I've created a new element via JS, but that I haven't appended it yet to the document body, is there's a way I can access this element by its id like I would normally do with getElementById?As far as I know document.getElementById('myId'




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: