|
|
|
13-11-25
|
조회 1,842
|
|
|
|
13-11-25
|
조회 2,377
|
|
|
|
13-11-25
|
조회 1,775
|
|
|
|
13-11-25
|
조회 1,927
|
|
|
|
13-11-25
|
조회 2,151
|
|
|
|
13-11-25
|
조회 1,790
|
|
|
|
13-11-25
|
조회 2,113
|
|
|
|
13-11-25
|
조회 2,211
|
|
|
|
13-11-25
|
조회 1,840
|
|
|
|
13-11-25
|
조회 2,381
|
|
|
|
13-11-25
|
조회 1,990
|
|
|
|
13-11-25
|
조회 1,809
|
|
|
|
13-11-25
|
조회 4,081
|
|
|
|
13-11-25
|
조회 1,986
|
|
|
|
13-11-25
|
조회 1,790
|
|
|
|
13-11-25
|
조회 2,067
|
|
|
|
13-11-25
|
조회 1,880
|
|
|
|
13-11-25
|
조회 1,798
|
|
|
|
13-11-25
|
조회 2,627
|
|
|
|
13-11-25
|
조회 1,826
|
댓글 2개
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Jason Chavannes" />
<title>jQuery Timer Demo</title>
<link rel="stylesheet" href="res/style.css" />
<script type="text/javascript" src="res/jquery.min.js"></script>
<script type="text/javascript" src="jquery.timer.js"></script>
<script type="text/javascript" src="res/demo.js"></script>
</head>
<body>
<script>
function getRandom(max, min) {
return Math.floor(Math.random()*(max-min)) + min;
}
$(function() {
var rand = getRandom(100,300);
$('#startTime').val(rand);
});
</script>
<h1>jQuery Timer Demo</h1>
<p>Project home: <a href="http://jchavannes.com/jquery-timer" target="_blank">http://jchavannes.com/jquery-timer</a></p>
<p><a href="res/demo.js" target="_blank">View Source</a></p>
<hr/><h3 style='margin-top:20px;'>Example 1 - Stopwatch (counts ups)</h3>
<span id="stopwatch">00:00:00</span>
<p>
<input type='button' value='Play/Pause' onclick='Example1.Timer.toggle();' />
<input type='button' value='Stop/Reset' onclick='Example1.resetStopwatch();' />
</p>
<br/>
<br/>
<h3>Example 2 - Countdown Timer</h3>
<span id="countdown">05:00:00</span>
<form id="example2form">
<input type='button' value='Play/Pause' onclick='Example2.Timer.toggle();' />
<input type='button' value='Stop/Reset' onclick='Example2.resetCountdown();' />
<input type='text' name='startTime' id='startTime' value='' style='width:30px;' />
</form>
추가된 내용은
<script>
function getRandom(max, min) {
return Math.floor(Math.random()*(max-min)) + min;
}
$(function() {
var rand = getRandom(100,300);
$('#startTime').val(rand);
});
</script>
그리고
<input type='text' name='startTime' id='startTime' value='' style='width:30px;' />
입니다