what is the difference b/w document.all() and document.getElementById()
This question is of javascript, you should ask javascript questions in javascript forum, not in java forum. You will be guided there better.
document.all() is a non-standard way of accessing DOM elements. It was originally started by IE. Other browsers either depricated it or don't support it. document.all gives you access to all the elements on your element.
On the other hand document.getElementById is a standard way of accessing the elements on the document. Each element have a unique id on the document which can be defined by id attribute of that element.
So if you have <div id="abc"></div>
and you do document.getElementById("abc"); then you will have access to that div.
But remember never give same ids to two different elements, else you could have unexpected results.