[whatwg] getElementsByIdPart

chriswa at comcast.net chriswa at comcast.net
Fri Jul 23 23:19:39 PDT 2004

It would be nice if you can add an API to that permit you to get elements based on part of the Id name.  This would permit you to create classes of controls in JavaScript.

For example ASP.NET labels the id of controls as ControlOuter1_ControlInner1_element.  If use such an API I can obtain all the elements of ControlOuter1 then all the elements of ControlInner1.  Thus I can build a control heirarchy in JavaScript.

Currently I use indexOf but it would be faster and more efficient if there was such an API of the DOM that supplies that information.


More information about the whatwg mailing list