| View previous topic :: View next topic |
| Author |
Message |
montanarry
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? |
| |
|
|
|
|
plantino
Joined: 13 May 2006 Posts: 96
|
Xpath
Its the easiest and more efficient way to go for it if your target browsers support it |
| |
|
|
montanarry
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? |
| |
|
|
plantino
Joined: 13 May 2006 Posts: 96
|
| Ie6 and mozish are ok |
| |
|
|
montanarry
Joined: 13 May 2006 Posts: 175
|
"ok" meaning "full support"?  |
| |
|
|
plantino
Joined: 13 May 2006 Posts: 96
|
| U might want to grab sarissa to use the same API |
| |
|
|
montanarry
Joined: 13 May 2006 Posts: 175
|
| Oh is Sarissa an abstraction / library? |
| |
|
|
plantino
Joined: 13 May 2006 Posts: 96
|
| IE does it through proprietery elem methods |
| |
|
|
montanarry
Joined: 13 May 2006 Posts: 175
|
| Oh okay |
| |
|
|
plantino
Joined: 13 May 2006 Posts: 96
|
| Moz through DOM L3 Xpath |
| |
|
|
| Page 1 of 4 |
Goto page 1, 2, 3, 4 Next |
|