aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes why newly the attribute names of newly created DOM nodes are all lowercase? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "why newly the attribute names of newly created DOM nodes are all lowercase? " Watch "why newly the attribute names of newly created DOM nodes are all lowercase? " New topic
Author

why newly the attribute names of newly created DOM nodes are all lowercase?

Chrix Wu
Ranch Hand

Joined: Nov 15, 2009
Posts: 121
I have this problem under Firefox 3.6.17:


var oElem = document.createElement('newElem');
oElem.setAttribute('Name', 'chrix');
console.info(oElem);

the console string is <newelem name="chrix" />

why the element name and the 'name' attribute are all lowercase?


** SCJP 5.0 84% **
** SCWCD 1.5 76% **
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Why does it matter?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Chrix Wu
Ranch Hand

Joined: Nov 15, 2009
Posts: 121
Bear Bibeault wrote:Why does it matter?


if i expect the attribute name to be "Name", but it turns out to be "name", I don't think i can gets the attribute value
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why newly the attribute names of newly created DOM nodes are all lowercase?
 
Similar Threads
error message when run jsp
Dropdown List and Command button
Naming convention for JSP File
Dynamically created {input type=file}
Form "action" issue / javascript question