?? ex_startwords.html
字號(hào):
<html><head><title>Startwords Parameter Example</title><script language="JavaScript"><!--function MakeArray(n) { this.length=n; for(var i=0;i<n;i++) this[i]="";}//array of words/phrases to search for//Go ahead and change the size and content to suit your needs.var words=new MakeArray(6);words[0]="muckraker";words[1]="goose";words[2]="nictating membrane";//not in example search fileswords[3]="html";words[4]="yacht cot";words[5]="thank";//Not as random as Math.random() (probably) but more widely supported...//Older browsers may support Java via plug-ins.function prandom(nn) { var mom=new Date(); mom=mom.getTime(); return mom%nn;}//--></script></head><body bgcolor=white><center><h1>SiteSearcher Test Page</h1><a href="ReadMe.html">Read the ReadMe</a>This page demonstrates how to write the SiteSearcher's applet tags "on-the-fly" with JavaScript. This also demonstrates an interesting use of the "startwords" parameter. By dynamicly changing this parameter, each time a visitor comes to the search page (in a new Java session which means a new browser window), the search box will contain a different set of words. <p>Please look at the source of this page. Since the target is set to a (presumably) nonexistent frame, a new window should be opened with the search results.<p><script language="JavaScript"><!--//It's necessary to write the whole applet tag from the JavaScriptdocument.writeln("<applet code=\"SearchToHTML.class\" width=350 height=60>");//Search these files (at or below this document's level//in the directories). The "file" parameter is required.//The applet's code must also be in the same directory as this page//to avoid SecurityExceptionsdocument.writeln("<param name=\"files\" value=\"rhyming_words.txt,muckraker.html,ReadMe.html\">");//Put these words in the search box on start up.//Note: reloading a page might not reload the applet so //the same words may stay in the box when you refresh.//Try closing the current window and opening the//page again in a new windowdocument.writeln("<param name=\"startwords\" value=\""+words[prandom(words.length)]+"\">");//Which frame should pages be opened in?//"_blank" tells the browser to open a new window.document.writeln("<param name=\"target\" value=\"MyNewWindow\">");//Displayed by browsers not supporting Java.document.writeln("This feature requires Java which you don't have.<p>");document.writeln("</applet>");//--></script></center></body></html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -