【发布时间】:2016-07-12 11:27:28
【问题描述】:
<div>
<input id="txt" type="text" placeholder="Choose File" />
<input type="file" id="selectedFile" class="hidden" onchange="ChangeText(this, 'txt');" />
<span>
<button type="button" onclick="document.getElementById('selectedFile').click();">Browse</button>
</span>
</div>
我只想要 Angular js 中的点击事件。谁能告诉我?
我只想要 Angular js 中的点击事件。 谁能告诉? 代码在注释中
【问题讨论】:
-
-
请把问题描述得更清楚。如果你想在角度点击事件,那么需要使用 ngclick 事件
-
我的代码在 js 中,对于浏览按钮,我已经给出了 onclick 事件,以便它会像这样获取 selectedfile id 元素, 所以我想要 angular js 中的函数
-
我不想在 Angular js 中使用 document.getElementById
标签: javascript angularjs