Site Notice
hello, world
Difference between revisions of "Progress"
From Project-EPB Commons
([InPageEdit] 没有编辑摘要) |
([InPageEdit] 没有编辑摘要) |
||
Line 6: | Line 6: | ||
if (typeof x === 'undefined') x = 0; | if (typeof x === 'undefined') x = 0; | ||
if (x < 5000) { | if (x < 5000) { | ||
− | x = x + | + | x = x + 50; |
} else if (x < 8000) { | } else if (x < 8000) { | ||
− | x = x + | + | x = x + 25; |
} else if (x < 9000) { | } else if (x < 9000) { | ||
− | x = x + | + | x = x + 15; |
} else { | } else { | ||
− | x = x + | + | x = x + 8; |
} | } | ||
if (x > 9850) clearInterval(goprogess); | if (x > 9850) clearInterval(goprogess); |
Revision as of 18:54, 21 November 2019
<html> <progress id="progress" value="0" max="10000" style="width: 80%; margin: auto 10%"/> <script> var goprogess = setInterval(function () {
if (typeof($) !== 'undefined') { if (typeof x === 'undefined') x = 0; if (x < 5000) { x = x + 50; } else if (x < 8000) { x = x + 25; } else if (x < 9000) { x = x + 15; } else { x = x + 8; } if (x > 9850) clearInterval(goprogess); $('#progress').val(x); }
}, 20); </script> </html>