我有这个HTML:
<form id="REVIEW" method="post" action="/SortReviews">
<fieldset class="sort">
<input type="submit" value="$ratingLine"/>
</fieldset>
</form>
Run Code Online (Sandbox Code Playgroud)
我想给提交按钮一些CSS,所以它看起来像一个链接.
{
background: none;
border: none;
color: blue;
text-decoration: underline;
cursor: pointer;
}
Run Code Online (Sandbox Code Playgroud)
我该怎么做?
Her*_*aaf 27
<style type="text/css">
form input[type="submit"]{
background: none;
border: none;
color: blue;
text-decoration: underline;
cursor: pointer;
}
</style>
Run Code Online (Sandbox Code Playgroud)
这不是你想要的吗?
如前所述,另一个选项是使用javascript提交锚点元素的表单:
<a href="#" onclick="document.review.submit()">submit</a>
Run Code Online (Sandbox Code Playgroud)
你的表单有一个属性: name="review"