document.getElementById("position")
时间: 2023-10-26 12:01:19 浏览: 147
document.getElementById()
根据提供的引用内容,我们可以看到在第二个引用中的HTML代码中没有找到id为"position"的元素。所以调用document.getElementById("position")将返回null。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [解决原生js或jQuery 实现父窗口的问题,如window.parent.document.getElementById()](https://blog.csdn.net/chelen_jak/article/details/73331096)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [关于document.getElementById(id)获取不到元素](https://blog.csdn.net/star0311/article/details/52332053)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文