//在列表中,使滑鼠移到之處的單詞
//產生“點亮”的效果
function lightOpt(ele)
{
var eleSrc;
//------------------------------------------
//常變數說明
//eleSrc :發生事件的元素
//------------------------------------------
eleSrc = ele;
eleSrc.className = "optLighted";
}
//在列表中,使滑鼠離開的單詞
//還原為初始狀態
function delightOpt(ele)
{
var eleSrc;
//------------------------------------------
//常變數說明
//eleSrc :發生事件的元素
//------------------------------------------
eleSrc = ele;
eleSrc.className = "optDelighted";
}
//得到定義過的將加入列表的單詞
function makeOpt(strWord, iWrdIdx)
{
var strOptHead, strOptFoot;
var strOptWord;
//------------------------------------------
//常變數說明
//strOptHead :重定義單詞頭。字串型
//strOptFoot :重定義單詞尾。字串型
//strOptWord :重定義單詞。字串型
//------------------------------------------
strOptHead = "<div class='optDelighted' >";
strOptFoot = "</div>";
strOptWord = strOptHead + strWord + strOptFoot;
//alert(strOptWord);
return strOptWord;
}
//刪除列表中的單詞
function removeOpt(ele)
{
var eleSrc;
var iIndex, iWrdIdx;
var astrWords, astrHead, astrFoot;
//------------------------------------------
//常變數說明
//eleSrc :發生事件的元素
//iIndex :表示詞彙分類的數字。整型
//iWrdIdx :單詞在單詞數組中的索引。整型
//astrWords :某類詞彙單詞數組。字串型數組
//astrHead :某類詞彙單詞數組頭部分。字串型數組
//astrFoot :某類詞彙單詞數組尾部分。字串型數組
//------------------------------------------
eleSrc = ele;
iIndex = getEleIndex(eleSrc.parentElement);
iWrdIdx = parseInt(eleSrc.wrdIdx);
//將單詞從詞彙數組中刪去
//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]);
//將剩餘的單詞重新寫入到頁面中
valueList(m_astrWords[iIndex], iIndex);
txtWord[iIndex].select();
}
//-->
</script>
</head>
<body>
<!--標題-->
<div align="CENTER">
<span style="font-size: 20pt; font-weight: BOLD">詞語搭配遊戲</span>
<span class="fontEng2">v1.0</span>
</div>
<hr style="visibility: HIDDEN">
<!--主表格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="將單詞儲存到記憶體中">儲存</button></td>
<td><button id="btnReset" style="width: 75px" title="從記憶體中刪去當前類別所有的單詞">重設</button></td>
<td><button id="btnSave" style="width: 75px" title="將單詞儲存到檔案中">存入</button></td>
<td><button id="btnLoad" style="width: 75px" title="從檔案中載入單詞">載入</button></td>
<td width="15%"><label id="lblWordList" title="單擊固定我">單字清單</label></td>
<td>
<div id="divWordList" class="listHidden"></div>
個數:<label id="lblWordCount" class="fontEng1"><%= 0%></label>
</td>
</tr>
<%Next%>
</table>
<hr style="visibility: HIDDEN">
<hr style="color: BLUE">
<!--主表格2-->
<table border="0" align="CENTER" width="80%">
<colgroup width="16%"></colgroup>
<colgroup width=&qu