如何用input标签得到文件名
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" charset="utf-8">
function a(){
var input=document.getElementById('input');
document.getElementById('p').innerText=input.value;
}
</script>
</head>
<body>
<input id='input' type="file" multiple="true">
<button type="button" onclick="a()">button</button>
<p id="p"></p>
</body>
</html>
页:
[1]