这个查询给了我一个来自数据库的列表
while($res=mysql_fetch_array($temp)){
echo "<tr>";
echo "<td id='copyme'>".$res['name']."</td>";
echo "<td><a href=''>Edit</a></td>";
}
echo "</tr>";
通过单击编辑,我希望将名称写入此输入框中,以便我可以更新或删除它,一旦名称出现在框中,sql 更新查询就可以工作,我唯一的问题是一旦我单击编辑就可以在那里获取名称。
<label>Template name:</label> <input id="temp_edit" type="text" name="tempname" />
id 如何通过 jquery 做到这一点?或者,还有更好的方法?