Your Code have Syntax Error
Try out the re-corrected Code
var lastModified = document.lastModified;
document.getElementById("modified").innerHTML = lastModified;