Created
October 24, 2019 09:01
-
-
Save cmartello/b99284c3426f2dbba9f39a494ef4af68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<HTML> | |
<HEAD> | |
<TITLE>tick tock</TITLE> | |
<SCRIPT> | |
var x = 0; | |
var z = 1325 / 3600 | |
function rightnow() { | |
var out = document.getElementById("write"); | |
var t = new Date(); | |
var h = t.getHours(); | |
var m = t.getMinutes(); | |
var s = t.getSeconds(); | |
// calculate seconds past 8 am | |
seconds = ((h-8)*3600) + (m*60) + s | |
// turn it into a cash value | |
out.innerHTML = '$'.concat(((seconds*z)/100).toFixed(2).toString()) | |
} | |
window.setInterval(rightnow, 1000); | |
</SCRIPT> | |
</HEAD> | |
<BODY> | |
<H1 id="write"></H1> | |
</BODY> | |
</HTML> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment