开发者

javascript upload error

开发者 https://www.devze.com 2023-03-25 00:59 出处:网络
Can someone guide me to what error is the following code having? Thanks a lot! $(document).ready(function() {

Can someone guide me to what error is the following code having? Thanks a lot!

$(document).ready(function() {
    var uploader = new qq.FileUploader({
    // pass the dom node (ex. $(selector)[0] for jQuery users)
    element: document.getE开发者_如何学ClementById('file-uploader'),
    // path to server-side upload script
    action: '/static/upload/php.php',
    onComplete: function(id, fileName, responseJSON){
        $('#form_upload').html();
        $('#form_upload').append('<input type="hidden" name="upload_file" value="'+fileName+'" />');
        $('#form_upload').append('<input type="hidden" name="upload_file_path" value="'+/IT1234/01/Week1+'" />');
        $('#form_upload').submit();
    }
}); 


Your second last brace (}) requires a closing parenthesis ()) after it. You should also place a semi-colon (;) after that.

$(document).ready(function() {
    var uploader = new qq.FileUploader({
    // pass the dom node (ex. $(selector)[0] for jQuery users)
    element: document.getElementById('file-uploader'),
    // path to server-side upload script
    action: '/static/upload/php.php',
    onComplete: function(id, fileName, responseJSON){
        $('#form_upload').html();
        $('#form_upload').append('<input type="hidden" name="upload_file" value="'+fileName+'" />');
        $('#form_upload').append('<input type="hidden" name="upload_file_path" value="'+/IT1234/01/Week1+'" />');
        $('#form_upload').submit();
    });
}); 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号