Skip to content

Instantly share code, notes, and snippets.

/lyscnter.html Secret

Created March 20, 2014 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/eb56bf63673b88ca0d41 to your computer and use it in GitHub Desktop.
Save anonymous/eb56bf63673b88ca0d41 to your computer and use it in GitHub Desktop.
學生佔立院議場計時器 (需要jQuery)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="jquery.min.js"></script>
<head>
<body>
<div id="TDLeft" style="font-size:30px; ">學生佔立院累積:</div>
<script>
setInterval(hi,1000);
function hi(){
var YY = new Date().getFullYear()-1911;
var MM = new Date().getMonth()+1;
var DD = new Date().getDate();
var WW = new Date().getDay();
var HH = new Date().getHours();
var NN = new Date().getMinutes();
var SS = new Date().getSeconds();
var WC = ['日','一','二','三','四','五','六'];
var DH = (((DD-18)*24+HH)-21)
$('#TDLeft').text("學生佔立院累積" + (DH) + "時" + (NN) + "分" + (SS) + "秒");
}
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment