بايد يك صفحه به اسم سرچ با فرمت اچ.تي.ام بسازي و اين كد رو تش قرار بدي:
<HTML><HEAD>
<TITLE>Search this site</TITLE>
</HEAD>
<BODY>
<FORM name=formSear action="search.html" method="GET" onSubmit="return OnSearchSubmit()">
<p align="center"><INPUT name=searWords > <INPUT name=Send type=submit value=Search>
</FORM>
<p align="left">
<script LANGUAGE="JavaScript" src="webdata.js"></script>
<script LANGUAGE="JavaScript" src="searchfunc.js"></script>
</BODY>
</HTML>
بعد يك فايل جاوا اسكريپت به اسمsearchfunc بسازي و توش اين كد رو قرار بدي:
//Translate search result info into your language
StrYourSearch=":کلمه مورد نظر"; //Your search
StrNewSearch="از نو"; //New Search
StrCloseWindow="اتمام"; //Close Window
StrFind="پیدا شده"; //Find
StrItems="نشانه ها"; //items
strResultPage="صفحه نتیجه"; //Result Page
strPrevious="مورد قبلی"; //Previous
strNext="موردبعدی"; //Next
//Options for the search engine
MatchingStrategy=0; //0:Use all words,1:Use any words,2:Use exact phrase
SearchStrategy=0; //0:search all text,1:Search title,2:Search keywords,3:Search description
ItemsPerPage=10; //Display how many items of search result on per page
ResultLinkTarget=""; //default value: "", can be "_self", "_top", "_blank", "_parent" or name you defined
OutPutWindowType=1; //0:same window,1:new window,2:use frame,3:use iframe
OutPutNewWindowProperty="resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,directories=no,width=590,height=300";
OutPutNewWindowOpenMode=0; //0:Always open new window,1:Reuse the window opened
SearchFormFrame="search"; //The search box frame name
OutputTarget="result"; //default value: "result", can be "_self", "_top", "_parent" or name you defined
ChangeLinkCaseProp="0"; //0:Unchanged,1:to lower case,2:to upper case
NumberSearchResult="1"; //0
isplay number,1:Not display
OutPutResultTitle=1; //0: not output,1: output
OutPutResultText=1; //0: not output,1: output
OutPutResultUrl=1; //0: not output,1: output
OutPutResultInfo=1; //0: not output,1: output
NoHorizLine=0; //0: has Horizontal lines,1: no
NoPoweredBy=1; //0: has Powered By info,1: no
ResultTitleSize='3'; //default size: '3'
ResultTitleFace='Arial'; //default face: 'Arial'
ResultTitleShape=0; //0: Normal,1: Italitics,2: Bolds,3:Italitics and Bolds
ResultTitleColor='#0000ff'; //default color: '#0000FF'
ResultTextSize='2'; //default size: '2'
ResultTextFace='Arial'; //default face: 'Arial'
ResultTextShape=0; //0: Normal,1: Italitics,2: Bolds,3:Italitics and Bolds
ResultTextColor='#c0c0c0'; //default color: '#000000'
ResultUrlSize='2'; //default size: '2'
ResultUrlFace='Arial'; //default face: 'Arial'
ResultUrlShape=0; //0: Normal,1: Italitics,2: Bolds,3:Italitics and Bolds
ResultUrlColor='#008000'; //default color: '#008000'
ResultInfoSize='2'; //default size: '2'
ResultInfoFace='Arial'; //default face: 'Arial'
ResultInfoShape=0; //0: Normal,1: Italitics,2: Bolds,3:Italitics and Bolds
ResultInfoColor='#000000'; //default color: '#000000'
HitTitleSize='3'; //default size: '3'
HitTitleFace='Arial'; //default face: 'Arial'
HitTitleShape=0; //0: Normal,1: Italitics,2: Bolds,3:Italitics and Bolds
HitTitleColor='#cc0033'; //default color: '#CC0033'
HitTextSize='2'; //default size: '2'
HitTextFace='Arial'; //default face: 'Arial'
HitTextShape=0; //0: Normal,1: Italitics,2: Bolds,3:Italitics and Bolds
HitTextColor='#cc0033'; //default color: '#CC0033'
DecorateBefore=""; //Decorate HTML code before search results
DecorateAfter=""; //Decorate HTML code after search results
ExcludedSearchWords=new Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","!","*","(",")","-","_","+","=","\\","{","}","[","]",":",";","\"","'","<",">",",",".","?","/","of","the","or","and");
RootReplaceURL="";
SEBWebsite="http://www.RainDigital.com";SEBEmail="
[email protected]";SEBAuthor="RainDigital.com";CurScriptType="JS";
بعد اسكريپت webdata رو بسازي و توش اين كد رو قرار بدي:
arrFiles=new Array();
arrFiles[0]=new Array("اينجا اسم يكي از صفحه ها يي كه ميخواهي توش عمل جست و جو انجام بشه","اين جا هم عنوان صفحه")؛
به همين ترتيب الي آخر.