![]() |
New Way to Access DOM
Hi All
Suprisingly it was new for me, when i was working with a core javascript code and found something very interesting there. It was a new way DOM elements are being processed in javascript. I am not sure whether this is pure luck or something really interesting and innovating. Let me help decide this... :) Problem: It was a simple textbox like Code:
<input type="text" id="userName" />Code:
alert(userName.value)I am not getting how this is being treated as a DOM object. i debugged and found complete DOM object is available once we use element id as a variable in javascript. I am not getting exact reason why it is happening and if possible how it is getting converted as a DOM object, and if its so, so what's the use of javascript/jquery left to make DOM for html elements. kindly help me resolve this, wishing for a innovation soon :) Thanks Jatin |
(Un)fortunately it's just an IE bug! See http://webbugtrack.blogspot.in/2007/...lution-in.html
|
Thanks for your response.
But i am just wondering i checked it will all browsers namely IE, Chrome and FF. It worked same in all.. |
| All times are GMT +1. The time now is 06:46 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.