<html>
<body>
<form action="/demo/htmldom/action_page.php">
选择文件:<input type="file" id="myFile" name="img" multiple>
<input type="submit">
</form>
<p>点击“试一试”按钮查看文件上传按钮是否接受多个值(文件)。</p>
<button onclick="myFunction()">试一试</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myFile").multiple;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>