javascript - How to click or trigger a hidden input file on Iphone (Embjer.js development) -
if press button, hidden input file can triggered:
html:
<button {{action 'addimage'}}>click me!</button> <input id="addattach" type="file" accept="application/*, image/*" style="display:none" />
js (ember.js):
actions:{ addimage: function(){ em.$('#addattach').val('').click(); } }
but doesn't work in chrome on iphone.
try old fashioned way, don't believe jquery required:
<button id="push" onclick="document.getelementbyid('add').click()">click me!</button> <input id="add" type="file" style="display:none">
Comments
Post a Comment