custom html button code for a form -


tti know lame question in order right need help.

this html code

<form name="form1" class="form1"> <fieldset>     <legend>subscription</legend>     <label for="subname">name</label>     <input type="text" name="subname" />     <label style="padding-left:20px;" for="subemail">your email</label>     <input type="text" name="subemail" /> </fieldset> </form> <div style="width:100%; font-size:14px;text-align:center;"><a href="#">click here subscribe</a> </div> <div class="subscribe"><a href="#"></a> </div> 

and here fiddle

http://jsfiddle.net/v8rb2/

how can associate "click here subscribe" text , button form?

if understood correctly, want submit form when link clicked. this, you'll have use javascript.

a quick way of doing telling form submit in onclick attribute of link.

<a onclick="form1.submit()" href="#">click here subscribe</a> 

what happens is, when link clicked, trap onclick event , tell form1 submit itself.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -