jQuery pull images from directory

后端 未结 4 2045
再見小時候
再見小時候 2020-12-03 05:51

Is it possible to pull a bunch of .jpg pictures form a local file and throw them into a list? Sorry, I was very vague

Pulling from a directory (relitive to

4条回答
  •  天命终不由人
    2020-12-03 06:33

    You could use the following to dynamically create an image and append it to a list.

    $('')
        .attr('src', 'FOLDER LOCATION HERE')
        .appendTo('#mylist')
    

    some quick searching led me to find a FileSystemObject ( ActiveX =( ) to search a folder for files.

    here is a link: http://www.codeproject.com/KB/scripting/search_in_files.aspx

    but if you are doing any server side processing (.net, php, whatever) that would be the best way to figure out what images are available to you to display on the page. (so if you could clarify)

提交回复
热议问题