首页 > 代码库 > ....

....

 

图片上传 - 博客园

<script type="text/javascript" src="http://common.cnblogs.com/script/jquery.js"></script><script type="text/javascript" src="http://www.mamicode.com/scripts/tiny_mce_popup.js?id=20121225-2"></script><script type="text/javascript" src="http://www.mamicode.com/scripts/bootstrap.min.js"></script><script type="text/javascript" src="http://www.mamicode.com/scripts/jquery.fineuploader-3.1.min.js"></script>
 
 
<script type="text/javascript">// 上传本地图片‘, dropProcessing: ‘(支持文件拖放上传)‘ }, showMessage: function (message) { $(‘#message‘).html(message); }, template: ‘
‘ + ‘
{dragZoneText}
‘ + ‘
{uploadButtonText}
‘ + ‘{dropProcessingText}‘ + ‘
    只能上传单张10M以下的 png、jpg、gif 格式的图片
‘ + ‘
‘, classes: { success: ‘alert alert-success‘, fail: ‘alert alert-error‘ }, multiple: false }).on(‘complete‘, function (event, id, fileName, responseJSON) { if (responseJSON.success) { document.domain = ‘cnblogs.‘ + location.hostname.substring(location.hostname.lastIndexOf(".") + 1, location.hostname.length); tinyMCE_insertImage(responseJSON.message); } else { $(‘#message‘).html(responseJSON.message); } }); });// ]]></script>

....