¡@

Home 

2014/10/16 ¤W¤È 12:06:01

jquery Programming Glossary: openfile

upload file from client to server without openFile dialog

http://stackoverflow.com/questions/10578803/upload-file-from-client-to-server-without-openfile-dialog

file from client to server without openFile dialog i am trying to create an aspx page where i can directly upload a file from the client to the server without user..

jQuery find file extension (from string)

http://stackoverflow.com/questions/3042312/jquery-find-file-extension-from-string

possible for jQuery to find a file extension based on a returned string A filename string will be passed to a function openFile and I wanted that function to do different things based on what file has been passed through it could be image files or.. to do different things based on what file has been passed through it could be image files or pdf files. function openFile file if .jpg .gif .png do something if .zip .rar do something else if .pdf do something else I've been looking for something.. Test the live example http jsfiddle.net 6hBZU 1 It assumes that the string will always end with the extension function openFile file var extension file.substr file.lastIndexOf '.' 1 switch extension case 'jpg' case 'png' case 'gif' alert 'was jpg png..