Site Search Script Example three (JavaScript)

Source: Internet
Author: User
Script Description:
The first step: Add the following code to the <body> area
<script language= "JavaScript" >
var key = "";
function Makeentry () {
This. Name= "";
This. URL = "";
This. Desc = "";
This. Category = "";
This. Target = "";
return this;
}
function Makearray (n) {
This.length = n;
for (var k = 1; k <= N; k++) {
This[k] = "";
}
return this;
}
function Makelinks (size) {
This.length = size;
for (var r=1; r<= size; r++) {
THIS[R] = new Makeentry ();
THIS[R]. Name = Namesarray[r];
THIS[R]. URL = Urlsarray[r];
THIS[R]. Desc = Descarray[r];
THIS[R]. Category = Categoryarray[r];
THIS[R]. Target = Targetarray[r];
}
return this;
}
var linksize=0
Datesarray = new Makearray (linksize);
Namesarray = new Makearray (linksize);
Urlsarray = new Makearray (linksize);
Descarray = new Makearray (linksize);
Categoryarray = new Makearray (linksize);
Targetarray = new Makearray (linksize);
var arraycount=0
<!--database section starts-->
Arraycount + 1
Urlsarray[arraycount] = "http://java2000.126.com"
Namesarray[arraycount] = "Java Script resource station CHINESE-GB"
Descarray[arraycount] = "java, JavaScript, scripts, applet, HTML, DHTML, ActiveX, midi, search, downloads,
Scripts, free, resources "
Categoryarray[arraycount] = "Coolest Java Script resource station, lots of detailed Java source code and instance descriptions!"
Targetarray[arraycount] = "Target=_blank"
Arraycount + 1
Urlsarray[arraycount] = "http://members.aol.com/MASTER54X/Anime.html"
Namesarray[arraycount] = "Anime Master"
Descarray[arraycount] = "Anime master, anime, Project A-ko, Vampire Hunter D, Tenchi Muyo, Bubblegum
Crisis, Sailor Moon, Sailormoon gunsmith Cats, Slayers, all Purpose cultural cat girl Nuku Nuku, plastic
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.