javascript搜索框和编辑字体大小

时间:2016-09-20 18:44:55

标签: javascript jquery html search fonts

这是一个用于搜索某个数据库的JavaScript。该脚本会生成一个Search按钮来提交查询,有没有办法调整此按钮中文本的字体/大小

<script src="http://www.bccls.org/js/jquery-1.7.2.min.js" type="text/javascript" ></script>
<script src="http://www.bccls.org/js/searchPolaris.js?v=2" type="text/javascript" ></script>

<form name="search" id="search" action="javascript:searchPolaris()">
    <input name="query" type="text" id="query" style="width: 220px">
    <input type="hidden" NAME="whichlibrary" id="whichLibrarySelected" value="119">
    <br />
    <input type="submit" value="Search" target="_blank">
    <input type="hidden" name="newWindowCheck" id="newWindowCheck" value="newWindow">
</form>

1 个答案:

答案 0 :(得分:1)

你可以用css:

&#13;
&#13;
input[type="submit"] {
  font-size: 3rem; /* or whatever...*/
  }
&#13;
<script type="text/javascript" src="http://www.bccls.org/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="http://www.bccls.org/js/searchPolaris.js?v=2"></script>

<FORM name="search" id="search" 
action="javascript:searchPolaris()">
   <input name="query" type="text" id="query" style="width: 220px"><input type="hidden" NAME="whichlibrary" id="whichLibrarySelected" value="119">
   <br />
   <input type="submit" value="Search" target="_blank"><input type="hidden" name="newWindowCheck" id="newWindowCheck" value="newWindow">
</form>
&#13;
&#13;
&#13;