Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html submit links

Tags:

html

I want to create a submit link instead of a submit button.

It looks like any ordinary link (blue and underlined) and when you click on it, the form is submitted.

Edit: is it possible to do this without javascript/jquery?

like image 633
SuperString Avatar asked Feb 24 '23 11:02

SuperString


2 Answers

No js, only CSS

<input type="submit" value="ABC" style="background:none; border-width:0px; color:blue; text-decoration:underline;" />
like image 171
Howard Avatar answered Mar 12 '23 10:03

Howard


You can do it with Javascript:

<a href="#" onclick="document.formName.submit();return false;">submit form</a>

Edit:

This page:

http://www.beginningjavascript.com/Chapter4/exampleSubmitToLinks.html

has styled a button to look like a link, but it still uses Javascript to achieve it.

like image 20
Tom Gullen Avatar answered Mar 12 '23 09:03

Tom Gullen