Saobi
Saobi

Reputation: 17021

Does the ID's of DOM change from browser to browser?

In C#, I am using the mshtml.HTMLDocument to retrieve various elements from a page.

For example:

button = (mshtml.HTMLButtonElement)theDoc.getElementById("ID1");

Now, if I am running IE6,IE7,IE8, will "ID1" change depending on browser version?

Upvotes: 0

Views: 161

Answers (1)

Spencer Ruport
Spencer Ruport

Reputation: 35117

No, ID is an attribute of the tag. So if you have

<input type="button" id="ID1" ... /> 

It's ID will be ID1 in all browsers.

Upvotes: 3

Related Questions