使用一个按钮触发file按钮的click事件
代码在ie上可以运行,但在FF上没有反应
<html>
<head>
<script>
function getFile()
{
document.getElementById("importfile").click();
}
</script>
</head>
<body>
<input type="file" id="importfile"></input>
<input type="button" onclick="getFile();"></input>
</body>
</html>
代码在ie上可以运行,但在FF上没有反应
<html>
<head>
<script>
function getFile()
{
document.getElementById("importfile").click();
}
</script>
</head>
<body>
<input type="file" id="importfile"></input>
<input type="button" onclick="getFile();"></input>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货