dynamically setting properties in uploadify

后端 未结 2 1381
滥情空心
滥情空心 2020-12-19 22:27

is it possible to add a new property to a previously declared object? Here is some code to clarify (with the uploadify jquery plugin):

$(\'#featuredimageuplo         


        
2条回答
  •  青春惊慌失措
    2020-12-19 23:13

    I believe what you are looking for is this:

    $("#form").submit(function(){
        var $upload = $("#featuredimageupload");
        $upload.uploadifySettings('scriptData', { key : value });
        $upload.uploadifyUpload(); // Triggers the upload to start.
    });
    

    You can also get the current value by leaving the second parameter off:

    var currentSetting = $upload.uploadifySettings('scriptData');
    

提交回复
热议问题