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