problem description
()
trigger()
trigger()..
the environmental background of the problems and what methods you have tried
emm,
related codes
/ / Please paste the code text below (do not replace the code with pictures)
// HTML
<form action="{:url("index/User/userImg")}" enctype="multipart/form-data" method="post" style="display:none;">
<input type="file" name="image" /> <br>
<input type="submit" name="upImg" value="" />
</form>
//
$(".userImg").click(function(){
$("input[name="image"]").trigger("click");
$("input[name="image"]").change(function () {
var img = $(this).val();
if (img != "") {
$("input[name="upImg"]").trigger("click");
}
})
})
what result do you expect? What is the error message actually seen?
is, trigger () necessary in my project? if not, how can I modify the code? Or make valuable suggestions. Please don"t talk about using plug-ins, but you still want to exercise your hands-on skills. Thank you.)