It does not seem to make any sense, by the following reason: there is not such concept as "to go to div". You don't "go" anywhere.
The attribute
id
is used as an element identifier, unique in the HTML document. This is not the only way to obtain a DOM object or its wrapper. However, if it has to be the
id
, this is the way to find the DOM element in Javascript:
myElement = document.getElementById("abc");
See also the jQuery way (highly recommended):
http://api.jquery.com/id-selector[
^],
all other selectors:
http://api.jquery.com/category/selectors[
^].
If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[
^],
http://jquery.com[
^],
http://learn.jquery.com[
^],
http://learn.jquery.com/using-jquery-core[
^],
http://learn.jquery.com/about-jquery/how-jquery-works[
^] (start from here).
—SA