Site Notice
hello, world
Difference between revisions of "Progress"
From Project-EPB Commons
Line 3: | Line 3: | ||
<sctipt> | <sctipt> | ||
var goprogess = setInterval(function () { | var goprogess = setInterval(function () { | ||
− | if ($) { | + | if (typeof($) !== 'undefined') { |
if (typeof x === 'undefined') x = 0; | if (typeof x === 'undefined') x = 0; | ||
if (x < 500) { | if (x < 500) { |
Revision as of 18:49, 21 November 2019
<html> <progress id="progress" value="0" max="1000" style="width: 80%; margin: auto 10%"/> <sctipt> var goprogess = setInterval(function () {
if (typeof($) !== 'undefined') { if (typeof x === 'undefined') x = 0; if (x < 500) { x = x + 41.6; } else if (x < 800) { x = x + 20; } else if (x < 900) { x = x + 10; } else { x = x + 5; } if (x > 985) clearInterval(goprogess); $('#progress').val(x); }
}, 100); </script> </html>