Use a button as an A Href link

To create an A Href link that can be used as a button, we can use one of the two following methods:

function SubmitFrom(){
    document.myform.target.value="somescript.php3"
    document.myfrom.submit()
}
function ResetFrom(){
    document.myfrom.reset()
}
 
<a href="javascript:SubmitForm()"><img src=....></a>

or

<FORM name=remove ACTION='removeItem.php3' METHOD='POST' ENCTYPE='application/x-
www-form-urlencoded'> 
    <a href="javascript:document.remove.submit()">remove from cart</a>
</form>

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">