日期:2014-05-16 浏览次数:20343 次
<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; }