نمونه کد
<BODY><center>
<form name="jksearch" action="http://www.google.com/search" method="get" onsubmit="jksitesearch(this)">
<p><b>جستجو در مطالب :</b><br />
<input id="hiddenquery" type="hidden" name="q" />
<input name="qfront" type="text" style="width: 165; height:20" value="متن جستجو" /><div style="font: bold 11px Verdana;"><font size="2">گوگل:</font><input name="se" type="radio" checked><font size="2">
یاهو:</font><input name="se" type="radio"><font size="2"> ام اس ان:</font><input name="se" type="radio"><p> <input type="submit" value="جستجو" /></div>
<script type="text/javascript">
var domainroot="http://www.takcms.ir"
var searchaction=[
"http://www.google.com/search",
"http://search.yahoo.com/search",
"http://search.msn.com/results.aspx"
]
var queryfieldname=["q","p","q"]
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>
</center>
</body>
<p align="center"><a href="http://www.takcms.ir/" style=text-decoration:"none"><font size="1">
دریافت کد جستجوگر</font></a></p>
<form name="jksearch" action="http://www.google.com/search" method="get" onsubmit="jksitesearch(this)">
<p><b>جستجو در مطالب :</b><br />
<input id="hiddenquery" type="hidden" name="q" />
<input name="qfront" type="text" style="width: 165; height:20" value="متن جستجو" /><div style="font: bold 11px Verdana;"><font size="2">گوگل:</font><input name="se" type="radio" checked><font size="2">
یاهو:</font><input name="se" type="radio"><font size="2"> ام اس ان:</font><input name="se" type="radio"><p> <input type="submit" value="جستجو" /></div>
<script type="text/javascript">
var domainroot="http://www.takcms.ir"
var searchaction=[
"http://www.google.com/search",
"http://search.yahoo.com/search",
"http://search.msn.com/results.aspx"
]
var queryfieldname=["q","p","q"]
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>
</center>
</body>
<p align="center"><a href="http://www.takcms.ir/" style=text-decoration:"none"><font size="1">
دریافت کد جستجوگر</font></a></p>



