Tuesday, July 12, 2011

Get all elements in div using javascript

In javascript wee can get all html elements using getelemensbyname. Here is the sample for that

div = document.getElementsById('sample');

Elements = div.getElementsByName("*");

This will return all html elements with in a div.

No comments:

Post a Comment