Created
July 13, 2011 16:31
-
-
Save imaz/1080693 to your computer and use it in GitHub Desktop.
pomoの中身(うろ覚え)
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> | |
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> | |
<meta http-equiv="Content-Script-Type" content="text/javascript" charset="UTF-8"> | |
<title>pomodoro timer</title> | |
<script type="text/javascript" src="./pomodoro.js"></script> | |
</head> | |
<body> | |
<span id="timerStatus">停止中</span><br /><br /> | |
<input type="button" value="Start" onclick="startTimer()" /><br /> | |
<span id="pomoCount">0</span><span id="pomoMessage">ポモ。</span> | |
</body> | |
</html> |
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
function startTimer(){ | |
window.document.getElementById("timerStatus").innerHTML = "ポモなう"; | |
var tid=setTimeout("pomodoro()",1000*60*25); | |
} | |
function pomodoro(){ | |
window.focus(); | |
var cnt = window.document.getElementById("pomoCount").innerHTML; | |
cnt++; | |
window.document.getElementById("pomoCount").innerHTML = cnt; | |
window.document.getElementById("pomoMessage").innerHTML = "ポモ完遂しました!"; | |
window.document.getElementById("timerStatus").innerHTML = "停止中"; | |
window.alert("25分経過しました。"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment