Upload pictures in bulk

Source: Internet
Author: User

Implementation of

Reference

< Script src = "/common/jquery-1.9.1.min.js" type = "Text/javascript" ></ Script > < Script type = "Text/javascript" src = "/kindeditor-4.1.7/kindeditor-all.js" ></script>
<style type= "Text/css" > #imageView{background:#F5F9FF;padding:5px;}#imageView ul Li{margin:2px;float: Left;width:100px;Height:100px;position:relative;Border:1px solid #d5e4fa;}#imageView ul li img{width:100px;Height:100px;Border:0;}#imageView ul Li Span{position:Absolute; Right:5px;Top:5px;Height:14px;width:14px;background:URL (.. /images/false.gif) No-repeat;Display:None;}</style>

HTM page

<Tableclass= "Tableconfig"cellpadding= "0"cellspacing= "1"><TR>      <TDclass= "Leftcss"width= "+">Product Picture:</TD>      <TDcolspan= "3">           <DivID= "ImageView"class= "Clearfix"runat= "Server"><ul></ul></Div>           <inputtype= "button"ID= "Upimage"value= "Bulk upload"class= "Button1" />           <label><inputtype= "checkbox"ID= "Isclear"checked= "Checked" />Keep the uploaded</label>       </TD>   </TR>   <TR>       <TDclass= "Leftcss">More information:</TD>       <TDcolspan= "3">
<textareaname= "Txtcontent"ID= "Txtcontent"style= "width:100%; height:300px;"runat= "Server"></textarea> </TD> </TR> </Table>

JS section

<ScriptType= "Text/javascript" >functionBindimagelist () {$ ("#imageView ul li"). MouseEnter (function () {                $( This). Find ("Span"). Show (); }). MouseLeave (function () {                $( This). Find ("Span"). Hide ();            }); $("#imageView ul li span"). Click (function () {                if(Confirm ("OK to delete this picture")) {                    $( This). Parent (). remove ();        }            }); }        varEditor; $(function() {bindimagelist (); //Load Editor StylesEditor = Kindeditor.create (' textarea[name= ' txtcontent "] ', {allowfilemanager:false, Aftercreate:function () {                    varSelf = This;            }            }); //image Upload$(' #upimage '). Click (function() {Editor.loadplugin (' Multiimage ',function() {Editor.plugin.multiImageDialog ({clickfn:function(urllist) {var_html = []; Kindeditor.each (Urllist,function(i, data) {_html.push (' <li> '+ Data.url +' "/><span title=" delete "></span><input type=" hidden "value=" '+ Data.url +' "name=" pics " /></li> ');                            }); if($("#isClear"). attr ("checked")! = "Checked")                                $(' #imageView ul '). empty (); $("#imageView ul"). Append (_html.join ("));                            Bindimagelist ();                        Editor.hidedialog ();                }                    });            });        }); })    </Script>

Upload pictures in bulk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.