#2
hmhz2018-01-16 10:09
|
<tbody id="tbody1">
<tr>
<td>
<input id="chk" type="checkbox" name="chk" onclick="onchkClick();"/>
</td>
<td>
<input type="text" value="123" />
</td>
<td>
<input id="num" type="text" class="numberbox" precision="2" title="数量,0~2位小数" value="0" />
</td>
<td>
<input id="price" type="text" class="numberbox" precision="2" title="单位,0~2位小数" value="0" />
</td>
<td>
<input id="amount" type="text" class="numberbox" precision="2" readonly="readonly" value="0" />
</td>
</tr>
</tbody>
function setNumberBox(row) {
$(row).find(".numberbox").each(function () {
$(this).bind({
blur: function () {
alert($(this).parent().siblings("td:eq(1)").html());//正常抓到
alert($(this).parent().siblings("td:eq(1)").val());//抓不到