DOM

From DataFlex Wiki
Revision as of 13:52, 29 September 2007 by Jka (talk | contribs) (New page: all elements in a html page can have an id and be altered . Here's how to grab the element by the id and change it using javascript <pre> <a id="link" href="http://www.yahoo.com">tes...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

all elements in a html page can have an id and be altered .

Here's how to grab the element by the id and change it using javascript



<a id="link" href="http://www.yahoo.com">testing</a>

<script type="text/javascript">
 link=document.getElementById('link');
  link.href="http://msdn.com";
</script>