2014-05-12 76 views

回答

0
<input type="file" multiple name="files" /> 

和jQuery中:

$("input[type='file']").on("change", function(){ 
    var files = $(this).prop("files"); // you'll get selected file(s) 

    console.log(files); // here will display files as objects with their properties. Check with Chrome console what properties are. 
}); 

如果files是不確定的,則瀏覽器必須支持HTML5。

相關問題