Get form from form control (Button) : Button : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Button »

 

Get form from form control (Button)



    
<html>
<body>
<script language="JavaScript">
function function1(form) {
    var elem = document.getElementById("myButton").form.id;
    alert(elem);
    return true

</script>
<form id="myF">
<input id="myButton" 
       type="button" 
       value="Get ID of this control's form" onClick="function1(this.form);">
</form>
</body>
</html>

    
      
      



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Button