我正在與jsp工作,我有一個表,我從數據庫中檢索數據,我的問題是如何使錶行可點擊。而我在jquery中的知識卻一無是處。所以PLZ試圖幫助我的JavaScript。使一行可點擊
<table class="main" align="center" border="1">
<tr>
<td class="did">Dealer Id</td>
<td class="dname">Dealer Name</td>
<td class="door">Door no</td>
<td class="strt">Street</td>
<td class="city">City</td>
<td class="dst">District</td>
<td class="state">State</td>
<td class="mob">Mobile</td>
<td class="cntPer">Contact Person</td>
<td class="phne">Phone No</td>
</tr>
</table>
<div class="overflow">
<table class="main scroll" align="center" border="1">
<% while (rs.next()) {%>
<tr>
<td class="did"><%=rs.getString("deal_id_v") %></td>
<td class="dname"><%=rs.getString("deal_name_v")%></td>
<td class="door"><%=rs.getString("deal_door_no_v")%></td>
<td class="strt"><%=rs.getString("deal_street_v")%></td>
<td class="city"><%=rs.getString("deal_city_v")%></td>
<td class="dst"><%= rs.getString("deal_district_v")%></td>
<td class="state"><%=rs.getString("deal_state_v")%></td>
<td class="mob"><%=rs.getString("deal_mobile_no_v")%></td>
<td class="cntPer"><%=rs.getString("deal_contactperson_v")%></td>
<td class="phne"><%=rs.getString("deal_phone_no_v")%></td>
</tr>
<%}
%>
</table>
</div>
使用選擇選擇錶行,只寫點擊功能上...... –
添加上it.First一些規範給你正確的requirement.if你只是想使你的錶行可點擊然後只是用戶選擇器和類jquery點擊函數()。 –