日期:2014-05-17 浏览次数:20498 次
<head runat="server"> <title></title> <script src="scripts_test/jquery1.7.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $("#gridview tr:gt(0) td:nth-child(1) input:text").blur(function () { //ajax取数据 var json = { "no1": "11", "no2": "22" }; $(this).parent().nextAll("td:eq(5)").find("input:text").val(json.no1); $(this).parent().nextAll("td:eq(6)").find("input:text").val(json.no2); }) }) </script> </head> <body> <form id="form1" runat="server"> <div> <table border="1" cellpadding="5" cellspacing="0" id="gridview"> <tr> <td>服务/销售单号 </td> <td>产品编号</td> <td>名称</td> <td>品牌</td> <td>单位</td> <td>数量</td> <td>用户单位</td> <td>序列号</td> </tr> <tr> <td> <input type="text" name="name" value="" /> </td> <td>...</td> <td>...</td> <td>...</td> <td>...</td> <td>...</td> <td> <input type="text" name="name" value="" /> </td> <td> <input type="text" name="name" value="" /> </td> </tr> <tr> <td> <input type="text" name="name" value="" /> </td> <td>...</td> <td>...</td> <td>...</td> <td>...</td> <td>...</td> <td> <input type="text" name="name" value="" /> </td> <td> <input type="text" name="name" value="