JAVASCRIPT create progress bar javascript - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

Create progress bar using javascript


 523

JAVASCRIPT


1

<!DOCTYPE html>
<html>
<head>
<style>
#myProgress {
width: 50%;
background-color: grey;
border: 2px solid black;
border-radius: 10px;
}

#Prog_Bar {
width: 30%;
height: 30px;
background-color: #4CAF50;
text-align: center;
line-height: 30px;
color: white;
border-radius: 10px;
}
</style>
</head>
<body>

<div id="myProgress">
<div id="Prog_Bar">30%</div>
</div>

<br>
<button onclick="move_bar()">Click Me</button>

<script>
function move_bar() {
var element = document.getElementById("Prog_Bar");
var width = 30;
var id = setInterval(frame, 30);
function frame() {
if (width >= 100) {
clearInterval(id);
} else {
width++;
element.style.width = width + '%';
element.innerHTML = width * 1 + '%';
}
}
}
</script>

</body>
</html>


By     Created   
The power of the user (%)
60%



The most helpful JAVASCRIPT solutions

How to get client machine name or computer name with javascript ?How to get client machine name or computer name with javascript ?JAVASCRIPT

Click to see more ...

  3.3K     362

get client hostname javascriptget client hostname javascriptJAVASCRIPT

Click to see more ...

  1.9K     249

detect ie javascriptdetect ie javascriptJAVASCRIPT

Click to see more ...

  1K     148

get ip address javascriptget ip address javascriptJAVASCRIPT

Click to see more ...

  604     74

create qr code javascriptcreate qr code javascriptJAVASCRIPT

Click to see more ...

  414     67

how to create foreach class using javascript ?how to create foreach class using javascript ?JAVASCRIPT

Click to see more ...

  352     64

get current url using javascriptget current url using javascriptJAVASCRIPT

Click to see more ...

  266     52

get filename using javascript get filename using javascript JAVASCRIPT

Click to see more ...

  248     45

how to create the connect to a database with ADODB using javascript ?how to create the connect to a database with ADODB using javascript ?JAVASCRIPT

Click to see more ...

  231     43

How replace reverse solidus using javascript ?How replace reverse solidus using javascript ?JAVASCRIPT

Click to see more ...

  222     41