如何使用angularjs在按钮单击中动态添加文本框值 [英] How to get dynamically added textbox value in button click using angularjs
本文介绍了如何使用angularjs在按钮单击中动态添加文本框值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在div中有一个文本框和一个按钮,该div是动态创建的
我尝试过:
.js文件
-------------------------- ------
html文件
------------------ ---------------------------
i have a textbox and a button inside a div and that div is created dynamically
What I have tried:
.js file
--------------------------------
html file
---------------------------------------------
推荐答案
试试这个
try this
scope.addcrt = function (数量){
/ / alert(数量);
scope.addcrt = function (quantity) { // alert (quantity);
scope.arr.push({ item:
scope.arr.push({ "item":
这篇关于如何使用angularjs在按钮单击中动态添加文本框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文