Skip to content Skip to sidebar Skip to footer

Managing Html5 Div Size

So some time ago I developed a web application that allows users to launch a system application and view the debug log of that application in browser. I used Server Side EventSour

Solution 1:

After appending the message HTML of the last event to document.getElementById("debug").innerHTML, you should do the processing. Possibly something like this:

var content = document.getElementById("debug").innerHTML + event.data + "<br>";
var lines = content.split("<br>");
lines = lines.splice(lines.length - 2000, 2000);
document.getElementById("debug").innerHTML = lines.join("<br>");

Post a Comment for "Managing Html5 Div Size"