angularjs获取onclick上的焦点元素
单击按钮事件如何在我的表单上找到以光标为焦点的输入元素。 我的表单上有多个输入,希望将onclick上的一些数据与焦点元素绑定 HTML:angularjs获取onclick上的焦点元素,angularjs,Angularjs,单击按钮事件如何在我的表单上找到以光标为焦点的输入元素。 我的表单上有多个输入,希望将onclick上的一些数据与焦点元素绑定 HTML: 使用ng单击(为什么在模板中有onclick?)和依赖项注入$event,它将允许您在控制器中访问它 <div> <button onclick="findFocus"></button> <input type="text" id="name" /> <input type="text" id="e
使用ng单击
(为什么在模板中有onclick
?)和依赖项注入$event
,它将允许您在控制器中访问它
<div>
<button onclick="findFocus"></button>
<input type="text" id="name" />
<input type="text" id="email" />
<input type="text" id="address" />
</div>