Active Element : document : Javascript Objects JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Javascript Objects » document »

 

Active Element



    
<html>
<body onLoad="myButton.focus();">
<input type="Button" id="myButton" value="Element 1" onClick="function1();">
<script language="JavaScript">
function function1() {
    var m = document.activeElement.value;
    alert('The active element is '+m)

</script>
</body>
</html>

    
      
      



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Javascript Objects
» document