View and change the action URL of a form : Hyper Link : HTML JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » HTML » Hyper Link »

 

View and change the action URL of a form



<html>

<head>
<script type="text/javascript">
    function getAction(){
        var x=document.forms.myForm
        alert(x.action)
    }

    function changeAction(){
        var x=document.forms.myForm
        x.action="default.asp"
        alert(x.action)
    }
</script>
</head>

<body>
<form name="myForm" action="js_examples.asp">
<input type="button" onclick="getAction()" value="View value of action attribute">
<br>
<input type="button" onclick="changeAction()" value="Change value of action attribute">
</form>
</body>

</html>



           
       



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo HTML
» Hyper Link