5 回答

蝴蝶不菲
TA贡献1810条经验 获得超4个赞
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript">
window.onload=function(){
var active=document.getElementById("fileInput");
var mouseEvent = document.createEvent("MouseEvents");//FF的处理
mouseEvent.initEvent("click", true, true);
active.dispatchEvent(mouseEvent);
}
</script>
</head>
<body>
<input type="file" id="fileInput">
</body>
</html>
没有找到匹配的内容?试试慕课网站内搜索吧
添加回答
举报
0/150
提交
取消