How to change Form action at runtime using javascript. This the example which will change html form action at runtime. CODE: 1 : <html> 2 : <head> 3 : <Script Language="javascript"> 4 : function change_action(){ 5 : var frm_obj=document.getElementById("frm"); 6 : frm_obj.action="http://www.google.com"; 7 : } 8 : </Script> 9 : </head> 10 : <body> 11 : <form id="frm" action="abc.php" method="post" onsubmit="return change_action()"> 12 : UID <input type="text"><br> 13 : PWD <input type="Password"><br><br> 14 : <input type="submit" value="submit"> 15 : </form> 16 : </body> 17 : </html>
Code & help 4 PHP, JavaScript, HTML, DHTML, CSS, Flex, Dot Net, SharePoint, C-Sharp, Java, ReactJs, NextJs, Node, Web Tools, Blockchain