html multiple forms submit async

ayanhil2

New Member
I have a page like below. What I want to do is for every form element to have a \[code\]submit\[/code\] button, and each works different from the others. Is it possible?\[code\] <!DOCTYPE html><html><head><title>Example</title><style type="text/css">html, body { height: 100%; padding: 0; margin: 0; }form { width: 50%; height: 50%; float: left; }div { position :absolute }#f1{ background: #DDD; }#f2{ background: #AAA; }#f3{ background: #777; }#f4{ background: #444; }</style><script type="text/javascript"> function alertme() { alert("ok"); } function onload() { alert("I am loading"); } </script></head><body onload="onload();" ><form id="f1"><div id="div1"></div><p><input type="submit" value="http://stackoverflow.com/questions/14591857/Button1" onclick="alertme();" /></p></form><form id="f2"><div id="div2"></div><p><input type="submit" value="http://stackoverflow.com/questions/14591857/Button2" /></p></form ><form id="f3"><div id="div3"></div><p><input type="submit" value="http://stackoverflow.com/questions/14591857/Button3" /></p></form ><form id="f4"><div id="div4"></div><p><input type="submit" value="http://stackoverflow.com/questions/14591857/Button4" /></p></form></body></html>\[/code\]
 
Back
Top