In the list, the word where the mouse is moved
Produces a "light" effect
function lightopt (ele)
{
var elesrc;
//------------------------------------------
Constant variable description
ELESRC: An element of the event that occurred
//------------------------------------------
ELESRC = Ele;
Elesrc.classname = "optlighted";
}
In the list, make the mouse leave the word
Revert to initial state
function delightopt (ele)
{
var elesrc;
//------------------------------------------
Constant variable description
ELESRC: An element of the event that occurred
//------------------------------------------
ELESRC = Ele;
Elesrc.classname = "optdelighted";
}
Get 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: Redefine the end of a word. String type
Stroptword: Redefine the word. String type
//------------------------------------------
Stropthead = "<div class= ' optdelighted ' >";
Stroptfoot = "</div>";
Stroptword = stropthead + Strword + stroptfoot;
alert (Stroptword);
return Stroptword;
}
Delete a word from a list
function removeopt (ele)
{
var elesrc;
var iindex, Iwrdidx;
var astrwords, Astrhead, Astrfoot;
//------------------------------------------
Constant variable description
ELESRC: An element of the event that occurred
Iindex: A number that represents a lexical classification. Integral type
IWRDIDX: The index of a word in an array of words. Integral type
Astrwords: An array of word words of a class. Array of strings
Astrhead: The first part of an array of words in a class. Array of strings
Astrfoot: The tail part of a word array of words. Array of strings
//------------------------------------------
ELESRC = Ele;
Iindex = Geteleindex (elesrc.parentelement);
Iwrdidx = parseint (ELESRC.WRDIDX);
Delete a word from an array of words
Showarray (M_astrwords[iindex]);
Astrwords = M_astrwords[iindex].concat ();
Astrhead = Astrwords.slice (0, IWRDIDX);
Astrfoot = Astrwords.slice (iwrdidx + 1);
M_astrwords[iindex] = Astrhead.concat (astrfoot);
Showarray (Astrhead);
Showarray (Astrfoot);
Showarray (M_astrwords[iindex]);
Re-write the remaining words to the page
ValueList (M_astrwords[iindex], iindex);
Txtword[iindex].select ();
}
-->
</script>
<body>
<!--title-->
<div align= "CENTER" >
<span style= "FONT-SIZE:20PT; Font-weight:bold "> Word collocation game </span>
<span class= "FontEng2" >v1.0</span>
</div>
<!--Main Table 1-->
<table border= "0" align= "CENTER" width= "80%" >
<colgroup></colgroup>
<colgroup></colgroup>
<colgroup></colgroup>
<colgroup></colgroup>
<colgroup></colgroup>
<colgroup></colgroup>
<colgroup align= "CENTER" ></colgroup>
<colgroup></colgroup>
<%for m_icount = 0 to (m_ipartcnt-1)%>
<tr>
<td><%= M_astrsenpart (M_icount)%></td>
<TD width= "20%" ><input type= "text" id= "Txtword" style= "width:100%" ></td>
<td><button id= "Btngetword" style= "width:75px" title= "Save words in Memory" > Save </button></td>
<td><button id= "btnreset" style= "width:75px" title= "Delete all words in the current category from memory" > Reset </button></td>
<td><button id= "Btnsave" style= "width:75px" title= "Save words in File" > Deposit </button></td>
<td><button id= "Btnload" style= "width:75px" title= "load words from File" > Load </button></td>
<TD width= "15%" ><label id= "lblwordlist" title= "Click fixed Me" > Word list </label></td>
<td>
<div id= "divwordlist" class= "Listhidden" ></div>
Number: <label id= "Lblwordcount" class= "fontEng1" ><%= 0%></label>
</td>
</tr>
<%Next%>
</table>
<!--Main Table 2-->
<table border= "0" align= "CENTER" width= "80%" >
<colgroup width= "16%" ></colgroup>
<colgroup Width=&qu