You can Get and change the URL of a form in the following manner :
Code:
<html>
<head>
<script type="text/javascript">
function getAction ()
(
var x = document.forms.myForm;
alert (x.action)
)
changeAction function (action)
(
var x = document.forms.myForm;
x.action = action;
alert (x.action)
)
</ Script>
</ Head>
<body>
name="myForm" <form action="ejemplos.php">
<input type="button" onclick="getAction()" value="Ver action"> attribute value
<br>
<input type="button" onclick="changeAction('hola.php')" value="Cambiar action"> attribute value
</ Form>
</ Body>
</ Html>
Bookmarks