0
以下測試html在該行上創建了一個選項卡式列表(新建,更新,刪除)。以編程方式突出顯示/選擇「dl」項目
當前測試通過javascript/ajax調用更新數據,因此用戶選擇的選項卡不會更改,因爲該頁面不會重新顯示/重新生成。但是,如果我更改了測試,要回調服務器,所以服務器必須重新顯示頁面,我不知道如何突出顯示用戶選擇的選項卡! !
那麼,我怎麼編程突出顯示/選擇一個給定的「dl」元素!
感謝
<dl class="tabs" id="configPane">
<dt id="newterm-page" onclick="location.href='#'"><span>New Term</span></dt>
<dd>
<table class="adminform" width="100%">
<div style="border:1px solid #ccc">
<div>
<div style="width:200px;float:left;">Current Terms</div>
<div style="width:400px" id="newTerms"><select name="termList" id="termList" class="inputbox" size="1" title="Display List of Current Terms"><option value="1" >Spring</option><option value="2" >Summer</option><option value="3" >Fall</option><option value="9" >Winter</option><option value="10" >Summer I</option><option value="11" >Summer II</option></select></div>
</div>
<div><br></div>
<div>
<div style="width:200px;float:left;">New Term</div>
<input size="20" type="text" name="nterm" id="nterm" value="" />
</div>
<div><br></div>
<div>
<input type="button" name="button" value="Create Term" onclick="javascript: createTerm(); return false;">
</div>
</div>
</table>
</dd>
<dt id="updateterm-page" onclick="javascript: jt1('update'); return false;"><span>Update Term</span></dt>
<dd>
<table class="adminform" width="100%">
<div style="border:1px solid #ccc">
<div>
<div style="width:200px;float:left;">Select Term to Update</div>
<div style="width:400px;" id="updateTerms"><select name="upterm" id="upterm" class="inputbox" size="1" title="Display List of Current Terms"><option value="1" >Spring</option><option value="2" >Summer</option><option value="3" >Fall</option><option value="9" >Winter</option><option value="10" >Summer I</option><option value="11" >Summer II</option></select></div>
</div>
<div><br></div>
<div>
<div style="width:200px;float:left;">Updated Term</div>
<input size="20" type="text" name="uterm" id="uterm" value="" />
</div>
<div><br></div>
<div>
<input type="button" name="button" value="Update Term" onclick="javascript: updateTerm(); return false;">
</div>
</div>
</table>
</dd>
<dt id="deleteterm-page" onclick="javascript: jt1('delete'); return false;"><span>Delete Term</span></dt>
<dd>
<table class="adminform" width="100%">
<div style="border:1px solid #ccc">
<div>
<div style="width:200px;float:left;">Select Term to Delete</div>
<div style="width:400px;" id="deleteTerms"><select name="delterm" id="delterm" class="inputbox" size="1" title="Display List of Current Terms"><option value="1" >Spring</option><option value="2" >Summer</option><option value="3" >Fall</option><option value="9" >Winter</option><option value="10" >Summer I</option><option value="11" >Summer II</option></select></div>
</div>
<div><br></div>
<div><br></div>
<div>
<input type="button" name="button" value="Delete Term" onclick="javascript: deleteTerm(); return false;">
</div>
<div><br></div>
</div>
</table>
</dd></dl>