I have the following JavaScript code to show the current date in the format Mon Jun 2 17:54:28 UTC+0530 2014 within an HTA (HTML application). Now, I would like to display it as a welcoming message along with the current system date and time: Mon Jun 2 17:54:28 UTC+0530 2014. Additionally, I want this text to scroll from right to left for added effect.
I attempted to use the <marquee>
tag for creating a scrolling effect, but I am unsure of how to incorporate the JavaScript variable into it to include today's date and time. Unfortunately, my attempts have not been successful on my HTML page.
Could you please advise on how to resolve this issue?
HTML CODE:
<marquee behavior="scroll" bgcolor="yellow" loop="-1" width="30%">
<i><font color="blue"><strong>Welcome</strong> Today's date is : </font></i>
</marquee>
JAVASCRIPT TO DISPLAY THE CURRENT DATE AND TIME:
<script language="javascript">
var today = new Date();
document.write(today);
</script>