| View previous topic :: View next topic |
| Author |
Message |
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
|
Hiya. With Javscript and DOM/whatever, I would like to be able to get elements based on an attribute I invent. So for example: <span myAttribute="myVal">stuff</span>. I'd like to write some javascript to find elements that have the myAttribute attribute set. I know I can do this, but I don't remember how. Does anyone know?
Reply with quote
|
| |
|
|
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
|
Xpath
Its the easiest and more efficient way to go for it if your target browsers support it
Reply with quote
|
| |
|
|
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
|
plantino, I thought there was a built-in way to do it, though
If the browser supports it? I didn't know any browser had built-in xpath
Does ie6?
Reply with quote
|
| |
|
|
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
| |
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
| |
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
| |
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
| |
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
| |
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
| |
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
| |
| Page 1 of 4 |
Goto page 1, 2, 3, 4 Next |
|