【发布时间】:2013-11-01 06:34:24
【问题描述】:
我想搜索狗,所以当我点击提交按钮时,URL 看起来像 http://localhost/myproject/search.php?q=dog&submit= 我想禁用提交按钮是 URL 导航,它将看起来像 http://localhost/myproject/search.php?q=dog。
我的代码 -
<form id="formSearch" name="formSearch" method="get" action="search.php">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="67%" align="right" valign="top">
<input type="text" name="search" id="search" class="search_text_box" placeholder="Search" autocomplete="off"/>
</td>
<td width="33%" align="left" valign="top">
<input type="submit" name="submit" id="button" value=" " style="cursor:pointer;" class="search_btn" />
</td>
</tr>
</table>
</form>
请帮助我如何禁用 URL 导航中的提交按钮?
如果有任何 jquery 或 javascript 代码,请在下面发布您的答案
搜索图片截图
【问题讨论】:
-
为什么提交按钮的值是不间断空格?人们应该如何知道它的作用?
-
在按钮中添加禁用
-
@SridharR — 这将阻止它被用于提交表单。
标签: javascript php jquery query-string