如果我在输入字段中填满空格,并显示出网址中包含%20的结果,我如何提交我的搜索表?>
例如:篮球教练
输出:篮球%20coach
我想要此输出:
篮球教练
<form action="/tag/" id="form-hockey_v1" name="form-hockey_v1" onsubmit="return false;">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-hockey_v1" id="search" name="q" placeholder="Search Services..." autocomplete="off">
</div>
<div id="typeahead_id" class="typeahead__button">
<button class="searchsubmit" type="submit" onclick="window.location.href=this.form.action + this.form.q.value;">Search
</button>
</div>
</div>
</div>
</form>
如果我在输入字段中填写空格,它会向我显示一个在URL中带有%20的结果,例如,我显示此结果,该如何实现:篮球教练的输出:Basketball%20coach我想要这个...