Well, Iโm missing something here because it should be extremely simple, but it doesnโt work ...
I have a form on my page with an empty action attribute ( action="#" ). When the page is ready, I want to change the action attribute to something else. My code is very simple:
HTML:
<form action="#" method="post" id="register"></form>โ
JQuery
$("#register").attr("action", "http://www.test.com");โ
Even in a test script , this will not work! Look at the source of the result frame and you will see that the value of the action attribute is still # .
Where am I mistaken?
source share