javascript upload error
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();
});
});
精彩评论