Jumat, 14 September 2012

You are here : Home » MANJAKAN PEMBACA, TAMPILAN SIDE BAR 2, TOP WIDGET » 3 Mesin Pencari Sekaligus Dalam 1 Widget

3 Mesin Pencari Sekaligus Dalam 1 Widget

widget mesin pencari

Widget mesin pencari yang satu ini kelebihannya adalah ia dapat menelusuri kata kunci yang kita masukkan sesuai pilihan dari mesin pencari mana yang akan di gunakan.

Ada Google, Yahoo, atau juga MSN search engine.

Seperti ini nantinya.


Google Yahoo Msn

Jika Agan naksir, silahkan salin kode berikut :

<form name="jksearch" action="http://www.google.com/search" method="get" onsubmit="jksitesearch(this)" target="_blank">

<input id="hiddenquery" type="hidden" name="q" />
<input name="qfront" onfocus="if(this.value==this.defaultValue)this.value=&#39;&#39;;" value="Cari artikel di sini..." type="text" onblur="if(this.value==&#39;&#39;)this.value=this.defaultValue;" style="width: 180px;border:none;padding:8px 10px; font:normal 11px arial;color:#666; background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DMVaqSL2q5h1Nh16l0oIOC6l9G8H_056OGIhnQS5r-WH_utUspcRqCv1g2su_Cu6A-wXOpw1BCOziRQwovaQjbFTPqSPuqNXEnv32_5f6_2hXhliW8VOKdlw5XeTsZUXuL7xCaIEAdI/s1600/search_field.jpg) no-repeat;" /><input type="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHo9IJSJNtfjqSizLsvo6e1hWYJf0iEwUvmpty0L84VEbspJT_Gzd8QZuOqwDYo3Th_cs5RRYOUMI1TU_Yl8PC-NWew3ZA1gYqY9sXH-osq6uzfvPBBOqx12uhg7Tf37QM9r7c4DXbKVc/s1600/search_button.jpg" align="top" value="Search"/>

<div style="font: normal 11px Arial;color:#666;padding:2px 0;">
<input name="se" type="radio" checked /> Google
<input name="se" type="radio" /> Yahoo
<input name="se" type="radio" /> Msn
</div>

<script type="text/javascript">

// All-in-one Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use

//Enter domain of site to search.
var domainroot="http://ketagihanbaca.blogspot.com/"

var searchaction=[ //form action for the 3 search engines
"http://www.google.com/search",
"http://search.yahoo.com/search",
"http://search.msn.com/results.aspx"
]

var queryfieldname=["q","p","q"] //name of hidden query form for the 3 search engines

function switchaction(cur, index){
cur.form.action=searchaction[index]
document.getElementById("hiddenquery").name=queryfieldname[index]
}
function jksitesearch(curobj){
for (i=0; i< document.jksearch.se.length; i++){ //loop through radio to see which is checked
if (document.jksearch.se[i].checked==true)
switchaction(document.jksearch.se[i], i)
}
document.getElementById("hiddenquery").value="site:"+domainroot+" "+curobj.qfront.value
}
</script>
</form>

Perhatikan :

Ganti angka ini 180 untuk merubah ukuran lebar.

Ganti juga tulisan ini http://ketagihanbaca.blogspot.com/ dengan URL blog Agan.

Dan untuk cara pemasangannya tentu Agan sudah tahu, jika lupa saya pernah bahas caranya di sini. Ok. Salam blogger.

9 komentar: