<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>
我只想在角度js中的点击事件。谁能告诉?GetElementById等效于角js
我只想在角度js中的点击事件。 任何人都可以告诉? 代码在评论
请更清楚地描述问题。如果你想在angular角度点击事件,那么需要使用ngclick事件 –
我的代码是在js中,在浏览按钮中,我给了onclick事件,以便它将像这样获取selectedfile id元素, 所以我想要角度js中的那个函数 –