2015-01-21 14:52:04 2953次浏览 1条回答 0 悬赏 0 金钱

在Yii框架上引入插件uploadify。有没有人会的。求指教!!!!!

  • 回答于 2015-01-22 21:59 举报

    第一步,引入js插件:

    <script src="jquery.js" type="text/javascript"></script>
    <script src="jquery.uploadify.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="uploadify.css">
    

    第二步,html
    <input type="file" id="galleries" />

    第三步,js

    $("#galleries").uploadify({
            buttonText : '请选择...',
            fileObjName : 'file',
            fileTypeExts : '*.jpg;*.png;*.gif;*.jpeg;*.bmp',
            swf : '/uploadify.swf',
            uploader : 'upload',
            onUploadSuccess: function(file, dataStr, response){
                // dataStr及时服务器返回的数据
            }
        });
    

    貌似还有一个html5版本的,没用过

您需要登录后才可以回答。登录 | 立即注册
GuanGu
试用期

GuanGu

注册时间:2015-01-21
最后登录:2015-04-22
在线时长:2小时11分
  • 粉丝0
  • 金钱20
  • 威望0
  • 积分40

热门问题