Skip to content

Instantly share code, notes, and snippets.

@hemantajax
Created March 11, 2012 10:16
Show Gist options
  • Save hemantajax/2015884 to your computer and use it in GitHub Desktop.
Save hemantajax/2015884 to your computer and use it in GitHub Desktop.
HTML5:progress and meter
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Progress and Meter</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
meter{
height:30px;
margin:20px;
}
</style>
</head>
<body>
<p id="hello">Hello World</p>
<form>
<progress min="0" max="100" value="20"></progress>
<br />
<meter min="0" max="100" value="20">20</meter>
</form>
<script>
var d=document.querySelector("progress");
setInterval(function(){
d.value+=1;
},50);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment