**这是我想从中获取当前 f_prod_id 值的表,但是当我显示警报以显示该值时,我得到的只是一条空消息...
任何提示请...提前谢谢**
<div class="Productos" >
<table id="products" width="100%" cellspacing="0" cellpadding="0" border="0">
<thead>
<tr><th class="left">Prod</th><th><center>Desc</center></th><th>qty</th><th>Price</th></tr>
</thead>
<tbody>
<tr><td><a href="javascript:popUp2('some_link_here','700','400');"><input type="text" name="f_prod_id" size="10" value="5060102" readonly></td><td class="left">desc1</a></td><td><input type="number" name="f_qty" min="1" max="9999" step="1"></td><td>35.17</td></tr>
<tr><td><a href="javascript:popUp2('some_link_here','700','400');"><input type="text" name="f_prod_id" size="10" value="5060101" readonly></td><td class="left">desc2</a></td><td><input type="number" name="f_qty" min="1" max="9999" step="1"></td><td>18.48</td></tr>
</tbody></table>
</div>
这是我的脚本,但警报什么也没显示
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Totalizar</title>
<script type="text/javascript">
$(function()
{
$("#Calculate").click
(
// move value
function()
{
$("input[name=f_qty]").each
(
function()
{
var valueInCurrentTextBox = $(this).val();
var productId = $(this).find(".f_prod_id").text();
if (valueInCurrentTextBox != '')
{
$("#P23_qty").val(valueInCurrentTextBox);
alert('codid : ' + (productId));
}
}
);
}
);
}
);
</script>
</head>
<body>
<div id="totals"></div>
<p style="clear: both;">
<button type="button" style="font-weight: bold; width: auto;" id="Calculate">Agregar Productos</button></p>
</body>
</html>