我有<td>
可编辑。我想将已编辑的新数据发送到函数中,如何在<td (blur) ='showsavephonemodel(i want the newly edited value here i.e student.phone)' contenteditable="true" class ='phone' >
{{student.phone}}
</td>
标记中获取数据,任何人都可以帮助我。
sprintf
答案 0 :(得分:2)
您应该使用(keyup)
或(blur)
事件,
<td (keyup)='showsavephonemodel()' class ='phone'>
{{student.phone}}
</td>
<td (blur)='showsavephonemodel()' class ='phone'>
{{student.phone}}
</td>