在我的项目中,我需要在下次调用函数时显示以前的文本?我的代码是..
HTML 代码是:-
<div id="notes">
<textarea rows="21" cols="38" id="notes_id" placeholder="Enter your notes here..." onclick="current_time('videoPlayer')" onblur="play_video()" >
</textarea>
</div>
javascript:-
function current_time (player_id) {
var player = _V_(player_id);
var secs = player.currentTime();
var hours = Math.floor(secs / (60 * 60));
var divisor_for_minutes = secs % (60 * 60);
var minutes = Math.floor(divisor_for_minutes / 60);
var divisor_for_seconds = divisor_for_minutes % 60;
var seconds = Math.ceil(divisor_for_seconds);
var time = hours+ '::' +minutes+ '::' +seconds;
player.pause();
document.getElementById("notes_id").value = "Current Time :- " +time+ "\n";
}