Java dynamic page header

I was just tasked with updating a webpage in a Java enterprise web application to include a date in the page title.

Currently, the web page is a static html file - what do I need to do to get the page name as the current date in the format YYYY / MM / DD ? Sorry, I have no idea where to start!

+3
source share
2 answers
<script language="Javascript" type="text/javascript">
alert(document.title);
document.title = (new Date()) + " --- " + document.title;
</script>
+3
source

You have two options:

  • Refresh the page title with Javascript in the onload body event.
  • Become this static HTML file on a dynamic JSP page.

. , - . , .

+1

Source: https://habr.com/ru/post/1767309/


All Articles