$.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',
}
);
问题是 "$('#comment').val()" 总是空的,因为构造 $.jRecorder() 在用户写入之前采用 #comment 值。我怎么无法从 textarea 中获取文本!我试图这样做: this.host += $("#comment").val(); 但它不起作用!