0
我想創建一個搜索欄,它接受查詢並添加剩餘的URL,然後轉到該網站。例如如何從html輸入生成自定義URL?
輸入:沃爾瑪
輸出:http://www.example.com/?t=w&p=0&q=沃爾瑪
那麼程序導航到所生成的鏈接。這就像Google Chrome的多功能框一樣。
我想創建一個搜索欄,它接受查詢並添加剩餘的URL,然後轉到該網站。例如如何從html輸入生成自定義URL?
輸入:沃爾瑪
輸出:http://www.example.com/?t=w&p=0&q=沃爾瑪
那麼程序導航到所生成的鏈接。這就像Google Chrome的多功能框一樣。
只是簡單的HTML表單
<form method="GET" action="http://www.example.com/">
<input type="text" name="q">
<input type="hidden" name="t" value="w">
<input type="hidden" name="p" value="0">
</form>
這裏的東西我爲我的網站提出:
trapper.site90.net/luckysearch
,如果你想你可以使用我的代碼。我測試了它。只需在我的頁面上使用檢查元素。 :D
好的。你試過什麼了? – Isaac