Article View: pl.comp.lang.javascript
Article #51130Re: jquery - jak odczytać wszystkie parametry input file?
From: Cezary Tomczyk
Date: Wed, 11 Jul 2012 21:16
Date: Wed, 11 Jul 2012 21:16
20 lines
1434 bytes
1434 bytes
W dniu 2012-07-11 22:02, Sławek pisze:
> Witam
>
> Kręcę się w kółko z tym problemem. Jak odczytać/pobrać wszystkie
> wartości dla inputa type file multiple?
> Zrobię coś takiego
> var files = $('input[type="file"].myMulti')[0].files
Tak się nie da. Musisz podpiąć event onchange i potem oczytać dane z
obiektu /files/. Np.
$('input[type="file"].myMulti').bind('change', function(){
var filesdata = this.files;
});
--
Cezary Tomczyk
http://www.ctomczyk.pl/
Technical Details
Message-ID:
<jtkqen$8kd$1@inews.gazeta.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!news.gazeta.pl!not-for-mailReferences:
<jtkmav$bhk$1@mx1.internetia.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!news.gazeta.pl!not-for-mail From: Cezary Tomczyk <ctomczyk.pl@gazeta.pl> Newsgroups: pl.comp.lang.javascript Subject: Re: jquery - jak odczytać wszystkie parametry input file? Date: Wed, 11 Jul 2012 23:16:05 +0200 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 22 Message-ID: <jtkqen$8kd$1@inews.gazeta.pl> References: <jtkmav$bhk$1@mx1.internetia.pl> NNTP-Posting-Host: 89.177.145.149 Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1342041368 8845 89.177.145.149 (11 Jul 2012 21:16:08 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Wed, 11 Jul 2012 21:16:08 +0000 (UTC) X-User: ctomczyk.pl In-Reply-To: <jtkmav$bhk$1@mx1.internetia.pl> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit