I have input type submit defined inside a form. After some event, I need to replace this button with another button which is already defined hidden in my page. How can I do this in Javascript?
By replace, I mean, say, I have btn1
and btn2
. btn1
is inside form1
. After an event, btn1
should be replaced with btn2
, so after the replacement, btn2
should be part of the form1
and not btn1
. And yes, the buttons should do their replacement inside a form tag.
I tried gooogling ofcourse but I can't find the right words maybe?
I need to make it work in IE8.
Note : No JQuery please.