Is there anyway of defining a pageID sort of thing to an html page, for using in javascript code...
sorry, didn't get it...
Rahul Utb
2010-09-21 03:18:08
ok fine, thanks. Now to take use of this id can we anyhow fetch through javascript whats the id of this tag ?
Rahul Utb
2010-09-21 19:45:55
Yes, easily. In jQuery, it would simple be `$('body').attr('id')`. In native javascript, it would be something like: `document.getElementsByTagName('body')[0].id`.
Jamie Wong
2010-09-22 00:59:00