52,778
社区成员
发帖
与我相关
我的任务
分享
<struts:iterator value="supplierInventoryList">
<script type="text/javascript">getProductInfo();</script>
<tr>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1" id="productID"><struts:property value="productId"/></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1" id="name"></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1" id="unit"></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1" id="price"></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><struts:property value="quantity"/></span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><struts:property value="updateDate"/></span></div></td>
</tr>
</struts:iterator>function getProductInfo()
{
var productIDvalue=document.getElementById("productID").value; //获取id为productID标记的元素
createXmlHttp();
xmlHttp.onreadystatechange=writeProductInfo;//设置回调函数
xmlHttp.open("GET","<%=basePath %>product_ajax.jsp?productID="+productIDvalue,true);
xmlHttp.send(null);
}