'id' Example : id : Node Operation JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Node Operation » id »

 

'id' Example



    
<html>
<body>
<script language="JavaScript">
function getID(elem) {
   var id = elem.id;
   alert("This element's id attribute is set to "" + id + "".")

</script>
<p>Click in the following image to display the id attribute's value.</p>
<img id="myImg" 
     src="http://www.navioo.com/style/logo.png" 
     alt="http://www.navioo.com" 
     width="99" 
     height="78" 
     onclick="getID(this);">
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» id