商品相册: <div> <span style="color: red;"><%--双击删除图片--%></span> <div id="fileQueue"></div> <input type="file" name="duotu" id="uploadify" /> </div><link href="__UPLOADIFY__/common.css" rel="stylesheet" type="text/css" /><script type="text/javascript" src="__UPLOADIFY__/jquery.uploadify.min.js"></script><script type="text/javascript">
$('#duotu').uploadify({ swf: '__UPLOADIFY__/uploadify.swf', uploader: "{:U('Upload/upload')}",//文件上传php处理在附件中 buttonText:'立即上传', fileTypeDesc:'选择文件吧', queueID: 'fileQueue', multi: true, onUploadSuccess:function(file,data){ //将响应数据转换为json对象 data = $.parseJSON(data); var path=''; if(data.status == 0){ layer.msg(data.msg,{icon: 5}); }else{ layer.msg(data.msg,{icon: 6}); var str_html="<img src="+ data.url + " style='width:100px; height:80px;'>"+"<input type='hidden' class='gallery_img' name='gallery_img[]' value="+data.url+" />"; $('#fileQueue').append(str_html); } }, });
</script>