Javascript I';我使用jRecorder保存音频,我想向php页面发送评论:

Javascript I';我使用jRecorder保存音频,我想向php页面发送评论:,javascript,jquery,jrecorder,Javascript,Jquery,Jrecorder,问题是“$('#comment').val()”始终为空,因为构造$.jRecorder()在用户写入之前接受一个#comment值。。 我怎么不能从文本区域获取文本! 我试着这样做:this.host+=$(“#comment”).val(); 但它不起作用 要获取文本区域的内容,请尝试使用: $.jRecorder( { host : 'http://localhost/recorder/acceptfile.php?fil

问题是“$('#comment').val()”始终为空,因为构造$.jRecorder()在用户写入之前接受一个#comment值。。 我怎么不能从文本区域获取文本! 我试着这样做:this.host+=$(“#comment”).val();
但它不起作用

要获取文本区域的内容,请尝试使用:

        $.jRecorder(     
        { 
            host : 'http://localhost/recorder/acceptfile.php?filename=' +
                    Math.floor((Math.random() * 1000000000) + 1) + ':' +
                    $('#user_id').val() + ':' + 
                    $('#comment').val() ,               

            callback_started_recording:     function(){callback_started();},
            callback_stopped_recording:     function(){callback_stopped(); },
            callback_activityLevel:         function(level){callback_activityLevel(level); },
            callback_activityTime:          function(time){callback_activityTime(time); },

            callback_finished_sending:     function(time){callback_finished_sending();  alert(this.host) },

            swf_path : 'jRecorder.swf',

        }   
    );
而不是

$('#textarea').text() ;
$('#textarea').val() ;