// The word used to move the cursor to the place in the list
// Generate the "light" effect
Function lightOpt (ele)
{
Var eleSrc;
//------------------------------------------
// Constant Variable Description
// EleSrc: event element
//------------------------------------------
EleSrc = ele;
EleSrc. className = "optLighted ";
}
// Words that move the mouse away from the list
// Restore to the initial state
Function delightOpt (ele)
{
Var eleSrc;
//------------------------------------------
// Constant Variable Description
// EleSrc: event element
//------------------------------------------
EleSrc = ele;
EleSrc. className = "optDelighted ";
}
// Get the defined words that will be added to the list
Function makeOpt (strWord, iWrdIdx)
{
Var strOptHead, strOptFoot;
Var strOptWord;
//------------------------------------------
// Constant Variable Description
// StrOptHead: redefine the word header. String type
// StrOptFoot: specifies the end of a word. String type
// StrOptWord: redefines a word. String type
//------------------------------------------
StrOptHead = "<div class = 'optdelighted' onmouseover = 'lightopt (this); 'onmouseout = 'delimitertopt (this); 'ondblclick = 'removeopt (this ); 'wrdidx = '"+ iWrdIdx +"'> ";
StrOptFoot = "</div> ";
StrOptWord = strOptHead + strWord + strOptFoot;
// Alert (strOptWord );
Return strOptWord;
}
// Delete a word from the list
Function removeOpt (ele)
{
Var eleSrc;
Var iIndex, iWrdIdx;
Var astrWords, astrHead, astrFoot;
//------------------------------------------
// Constant Variable Description
// EleSrc: event element
// IIndex: indicates the number of the word category. Integer
// IWrdIdx: Index of words in the word array. Integer
// AstrWords: an array of certain vocabulary words. String array
// AstrHead: the header of a certain vocabulary word array. String array
// AstrFoot: the end of a certain vocabulary word array. String array
//------------------------------------------
EleSrc = ele;
IIndex = getEleIndex (eleSrc. parentElement );
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.