PUT GOOGLE SEARCH BOX IN BLOG
Đầu tiên, chọn nơi muốn hiển thị Box search, rồi tạo 1 widget HTML/Java rồi dán code vào. Ở đây mình sẽ giới thiệu Google Search và Google BlogSearch.
1. Google search:
Code:
<form action="http://www.google.com/search" method="get"target="_blank"><div style="border: 0px solid #ccc; padding: 4px; width: 20em;">
<table border="0" cellpadding="0">
<tbody><tr><td>
<input style="width: 120px;"maxlength="255" value="" name="q" size="25" type="text"/>
<input value="Tìm Kiếm" type="submit"/></td></tr>
<tr><td align="left">
<input checked="checked" value="YourBlog.blogspot.com" name="sitesearch" type="checkbox"/> Chỉ tìm kiếm ở Blog này</td></tr></tbody></table></div></form>
Có thể thay đổi các dòng code màu đỏ để trang trí box search theo ý bạn.
2. Google Blogsearch:
Hình minh họa:

Code:
<FORM METHOD="GET" ACTION="http://blogsearch.google.com/">
<INPUT TYPE="hidden" name="num" value="10" />
<INPUT TYPE="hidden" name="hl" value="en" />
<input name="as_sitesearch" value="YOURBLOG_URL" type="hidden">
<INPUT TYPE="text" NAME="as_q" style="width: 100px;" />
<INPUT TYPE="submit" value="Google Blog Search" />
</FORM>
nếu muốn mở tab mới
<form action="http://blogsearch.google.com/" target="_blank" method="get" style="margin: 0px; padding: 0px;">
<input type="text" maxlength="255" style="width: 200px;" value="" name="q" size="25" /><input type="submit" value="Tìm Kiếm" />
<input type="hidden" checked value="hzing.blogspot.com" name="sitesearch" />
</form>
nguồn: http://fandung.com
Không có nhận xét nào:
Đăng nhận xét