iframe .click() and .trigger() won't work in firefox v 4 below
I have an iframe on my site, in the iframe I put a button to trigger the
<input type="file">
These are the elements:
button id="click"
input type="file" id = "file"
This is the script code:
$("#click").click(function() {
$(开发者_如何学运维'#file').trigger('click');
});
I also replace the .trigger
into .click();
but nothing happens
Just remove commas.Try like this
assign button id="click1"
$("#click1").click(function() {
$("input").trigger('click');
});
精彩评论