3
我在網頁中有一個div,我只需要加載文本文件的最後第n行。 例如:JQuery只加載一頁的最後n行
<div id="contentdiv" style="white-space: pre-wrap;">here comes the output of the logfile</div>
<script>
$(function() {
$("#contentdiv").load("logs/logfile.log");
});
</script>
但我只需要最後5行的日誌文件。
謝謝你的完整答案!我會在3分鐘內接受你的回答(新會員的時間限制) – yoano
@yoano確定,很樂意幫忙。 – gurvinder372