<form action="/testresults/upload" method="post" enctype="multipart/form-data">
    <input type="file" id ='file' class="multi" accept="xml|csv|jpg" name="files[]"/>
<input style="width:90px;height:40px;" type="button" value="Upload"  onclick='return onCheck()'/>
</form>function onCheck()
{
var path = document.getElementById("file").text;
path = path.substring(path.lastIndexOf("\\")+1,path.length);
alert(path);
return false;}
问题是我一次上传多个文件的时候,他onclick这个只能得到一个文件的名字,其他文件的名字就是得不到,我们用的框架是cakePHP,不知道为啥?球高手,我整了好处时间都没整出来