国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - The file selection pop-up window cannot be called up in the callback function
給我你的懷抱
給我你的懷抱 2017-05-19 10:39:48
0
2
735

HTML

<input id="videoInput" type="file" style="display: none" />
<button type="submit" id="videoUploadInput">上傳文件</button>

JS

$('#videoUploadInput').click(function (e) {
  e.preventDefault()
  setTimeout(function() {
     document.getElementById('videoInput').click()
  }, 2000)
})

The initial positioning reason is that the click event is triggered by the callback function. At this time, event.isTrusted is false (this attribute is currently only supported in IE and Firefox), rather than being actively triggered by the user, that is, this event is not Trusted by the browser.

給我你的懷抱
給我你的懷抱

reply all(2)
給我你的懷抱

http://stackoverflow.com/ques...

http://stackoverflow.com/ques...

僅有的幸福

1. Change the delayed 2000 to 1000

Link description

2. Delayed processing functions are executed immediately

setTimeout((function(){})(),2000)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template