jsp页面循环查出数据后,如何点击“立即购买”获取<td>的值,
<%for(goodsgood:list){%><tr><td><imgsrc="<%=good.getImg()%>"width="200"height="100"al...
<%
for(goods good:list){
%>
<tr>
<td><img src="<%=good.getImg()%>" width="200" height="100" alt="images"/></td>
<td width="129"><%=good.getContent() %></td>
<td align="center"><%=good.getPrice() %></td>
<td align="center"><input type="button" value="立即购买" onclick="buyNow()" style="width:80px; height:30px;"/></td>
<form id="buynow" name="buynow" action="servlet/buynow" method="post"></form>
</tr>
<%}} %> 展开
for(goods good:list){
%>
<tr>
<td><img src="<%=good.getImg()%>" width="200" height="100" alt="images"/></td>
<td width="129"><%=good.getContent() %></td>
<td align="center"><%=good.getPrice() %></td>
<td align="center"><input type="button" value="立即购买" onclick="buyNow()" style="width:80px; height:30px;"/></td>
<form id="buynow" name="buynow" action="servlet/buynow" method="post"></form>
</tr>
<%}} %> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询