<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>slider</title>
</head>
<body>
<input type="range" min="0" max="100" value="0">
<script>
var timer = setInterval(update, 1000);
var n = 0;
function update() {
n += 10;
d3.select("input").attr("value",n);
console.log(n);
if (n == 100) {
clearInterval(timer);
}
}
</script>
</body>
</html>