<div class="codetitle"> <span><a style="CURSOR: pointer" data="51574" class="copybut" id="copybut51574" onclick="doCopy('code51574')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code51574"> <br> <br> <br> <br> <title>Jquery同代元素選取/未選取效果; <br> 腳本> <br> <br> function selectchange(tempid) { <br> alink.each(function () { <br> $( this).removeClass("templinkactive").addClass("templink"); <br> }); <br> <br> } <br> ; <br> <style type="text/css"> < 填色:5px; <BR> 文字裝飾:無; <BR> 背景顏色:#2788DA; <BR> 顏色:#ffffff; <BR> } 遊標:指針; <BR> 內邊界:5px; <BR> 文字裝飾:無; <BR> }<BR> </樣式> <BR></頭> <BR><身體> <BR> <form id="form1" runat="server"> <BR> linktable"> <BR> <tr>; <BR> <td> <BR> onclick="javascript:selectchange('001');"> <BR> 範本001 (三列) <BR> <BR> <td> <BR> <span id="alink002" class='templink ' onclick="javascript:selectchange('002');"> <BR> 🎜> <BR> <tr>; <BR> <td> <BR> <span id="a)003" class=403" class [ 範本003(三個欄位) <BR> <BR> <BR> 🎜> <span id="alink004" class='templink' onclick="javascript:selectchange('004 ');"> <BR> 範本004(中四列) > <BR> <tr>; <BR> <td> <BR> <td> <BR> <td> <BR> span id="alink005" class='templink' onclick="javascript:selectchange('005');"> <BR> <BR> < /tr> <BR> ; <BR> ; <BR></身體> <BR> <BR><BR></style> </title> </div>