[JS] test: introduce another HTML page to the HTML page. Will the IDs with the same name conflict with each other? jsid
One question asked today is:When another HTML page is introduced into the page HTML page, and exactly two pages have the same ID, do I need to use the ID to handle some behavior conflicts or report errors?
I used iframe to introduce another HTML page.
Prepare materials first: Prepare ). The content of the two pages is as follows:
Test.html:
<! DOCTYPE html>
Iframe.html:
<! DOCTYPE html>
Test results:
Result DisplayThe Section font color marked as id = "sameId" in the iframe framework page is not red, so even if another html page is introduced, the two pages have the same id and will not conflict with each other.
PS: This is just a test of embedding another webpage using the iframe method. I haven't tried other methods yet.
Author: Zhizhi
Sign: The road is long, and I will go up and down.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.