欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

检测按钮所在行

程序员文章站 2022-03-30 20:02:05
...
我想通过点击button触发change(this)事件,获取按钮所在行的id,然后调用changeTotext()方法,使所需要的单元格变换成文本框来进行修改数据,function change(obj){}方法不会写。
Insert title here
"; $n = 0; while($row = mysql_fetch_array($result)) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "". ""; echo ""; echo ""; ++$n; } mysql_close($db);?>
GoodsID BarCode GoodsName Category Specifications Manufacturers Numbers Instructions Pictures Update Delete
" . $row['id'] . "" . $row['barcode'] . "" . $row['goods_name'] . "" . $row['category'] . "" . $row['specifications'] . "" . $row['manufacturers'] . "" . $row['number'] . "" . $row['instruction'] . "" . "检测按钮所在行" . "". "". "".""."Delete".""."


回复讨论(解决方案)

把单元格的内容放在 div 中,动态设置 div 的 contenteditable 属性就可实现修改
contentEditable

相关标签: 检测按钮所在行