The production of Word collocation games (ASP) three

Source: Internet
Author: User
Tags array constant variable visibility
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>
&LT;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>
&LT;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



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.