I have this html:
<form id="REVIEW" method="post" action="/SortReviews">
<fieldset class="sort">
<input type="submit" value="$ratingLine"/>
</fieldset>
</form>
I want to give the submit button some css, so it looks like a link.
{
background: none;
border: none;
color: blue;
text-decoration: underline;
cursor: pointer;
}
How do I do it?
Link Submit Button Using Anchor Tags In HTML Write/Declare a Submit button between the Anchor tag's Starting and Closing tags. Give a Path where you wish to link your Submit Button by using the href property of the Anchor element.
In HTML Anchor tag's href attribute, we have to give our Another Web page's link (Where we want to Link out Input type submit Button). To Link HTML Input type submit to another page using HTML Form tags, we have to declare/write our HTML input type submit button between HTML Form Tag's Starting and Closing Tags.
When we click on the link, the function submitForm() will get executed. This function will get the element object using DOM getElementById() method by passing the form id to this method, then the form will be submitted by using submit() method.
The HTML <input type=”submit”> is used to define a submit button. It is used to submit all the user value to the form handler. The Form Handler is a server page that activates a script for processing all the input values.
<style type="text/css">
form input[type="submit"]{
background: none;
border: none;
color: blue;
text-decoration: underline;
cursor: pointer;
}
</style>
Is this not what you're looking for?
The other option, as already noted, is to use javascript to submit the form onclick of a anchor element:
<a href="#" onclick="document.review.submit()">submit</a>
with your form having an attribute: name="review"
You should assign a class to the button
<input type="submit" value="$ratingLine" class="link-lookalike"/>
and in your css file (or inside a <style type="text/css"></style>
tag) use
.link-lookalike {
background: none;
border: none;
color: blue;
text-decoration: underline;
cursor: pointer;
}
this way you can assign the class to different buttons in your page (if required), and they will all get the same look.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With