當我插入我想改變空間的文字「 - 」在搜索欄(「三星S7邊緣」到「三星-S7-EDGE」)。這裏是我的代碼:如何與改變的空間「 - 」,在搜索欄中輸入
<!-- BEGIN: search -->
<div id="search">
<form action="{INSTALLDIR}index.php" method="get" name="searchprod" id="prodsearch">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><input name="ps" type="text" id="searchbox" value="Cauta produse...ex. samsung-s7-edge" onfocus="this.value=''; this.style.color='#333333';" />
<input type="hidden" name="sv" value="1" />
</td>
<td><input type="submit" value="Cauta" class="searchButton" /></td>
</tr>
</table>
</form>
</div>
<!-- END: search -->
您可以澄清,如果您想在用戶輸入內容時進行此操作,或者在用戶點擊提交後在搜索結果頁上進行操作? –
請分享,你已經取得了什麼?一些代碼爲邏輯 – xxCodexx
謝謝你的重播塞爾格Chernata.Yes,我想這樣做,因爲用戶輸入 –