<form name="xingao"><table> <tr> <td> <input id="" name="q1" type="text" value=""/> <input id="wupin_id" type="text" value="1"/> <!--可用于判断不同的id以添加数据--></td> <td> <a href=" javascript:void(0)" onclick="window.open('2.php?lx=1');">导入</a> </td> </tr> <tr> <td> <input id="" name="q1" type="text" value=""/> <input id="wupin_id" type="text" value="1"/> <!--可用于判断不同的id以添加数据--></td> <td> <a href=" javascript:void(0)" onclick="window.open('2.php?lx=2');">导入</a> </td> </tr> </table></form>
opener.document.xingao.q1[ $n].value="显示内容";
$n 根据需要赋值,因为你的 q1 有多个,所以要按数组操作
<script src="/js/jquery-1.8.3.js"></script><script type="text/javascript"> function import_goods(node){ var tr_number=jQuery("table").index(jQuery(node).parent().parent());//行数 window.open('2.php?lx='+tr_number)} </script><form name="xingao"><table> <tr> <td> <input id="" name="q1" type="text" value=""/> <input id="wupin_id" type="text" value="1"/> <!--可用于判断不同的id以添加数据--></td> <td> <a href=" javascript:void(0)" onClick="import_goods(this);">导入</a> <a href=" javascript:void(0)" onClick="addProductDetail(this)">添加行</a> <a href="javascript:void(0)" name="deleteHref" id="deleteHref" onClick="delProductDetail(this)" style="display: none">删除</a> </td> </tr> <tr> <td> <input id="" name="q1" type="text" value=""/> <input id="wupin_id" type="text" value="1"/> <!--可用于判断不同的id以添加数据--></td> <td> <a href=" javascript:void(0)" onClick="import_goods(this);">导入</a> <a href=" javascript:void(0)" onClick="addProductDetail(this)">添加行</a> <a href="javascript:void(0)" name="deleteHref" id="deleteHref" onClick="delProductDetail(this)" style="display: none">删除</a> </td> </tr> </table></form>
tr_number = $(node).parents('tr').prevAll().length+1
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号