program to show a progress bar
Answer / Richa Sharma
To create a simple progress bar, you can use HTML and CSS along with JavaScript's `requestAnimationFrame` function. Here's an example:nn```htmln<!DOCTYPE html>n<html lang='en'>...n<style>n/* ... */n#progress {n width: 100%;n height: 25px;n border-radius: 4px;n background-color: #ccc;n box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);n}n#progress::after {n content: '';n position: absolute;n left: 0;n top: 0;n height: 100%;n width: 0;n background-color: #f44336;n transition: width .5s ease;}n</style>n<body>n <div id='progress'></div>n <script>n // ...n function updateProgress(percent) {n const progressBar = document.getElementById('progress');n progressBar.style.width = `${percent}%`;n }n function animateProgress() {n requestAnimationFrame(animateProgress);n updateProgress(Math.min( Math.random() * 100, 95 ));n }n animateProgress();n</script>n</body>n</html>
| Is This Answer Correct ? | 0 Yes | 0 No |
validation code / function to allow only NUmbers in a text box
Code for Adding Message and Confirmation Boxes Using JavaScript?
how to Auto Scroll the page
write a program segment that will ask the user if he wants to computer the perimeter of the area of the triangle. if the perimeter is wanted, ask the measure of the three sides and compute for the perimeter. if the area is wanted, ask for the measures of the base and height and compute for the area. display the computed value
Reading which Character Key was pressed
maximizing the main window
<html> <head> <title>BASIC CALCULATOR</title> </head> <script language= "javascript"> function= setValue(){ var a_term1 </script> <body> <center> <table> <tr> <td><input type="text" id="text box1" style="width:50px"> </td> <td><input type="text" id="text box2" style="width:40px"> </td> <td><input type="text" id="text box3" style="width:50px"> </td> </tr> </table> <table> <tr> <td><input type="text" id="text box4" ></td> </tr> </table> <table> <tr> <td><input type= "button" value= "7" onClick="" ></td> <td><input type= "button" value= "8" onClick="" ></td> <td><input type= "button" value= "9" onClick="" ></td> <td><input type= "button" value= "/" onClick="" ></td> </tr> <td><input type= "button" value= "4" onClick="" ></td> <td><input type= "button" value= "5" onClick="" ></td> <td><input type= "button" value= "6" onClick="" ></td> <td><input type= "button" value= "*" onClick="" ></td> </tr> <td><input type= "button" value= "1" onClick="" ></td> <td><input type= "button" value= "2" onClick="" ></td> <td><input type= "button" value= "3" onClick="" ></td> <td><input type= "button" value= "-" onClick="" ></td> </tr> <td><input type= "button" value= "0" onClick="" ></td> <td><input type= "button" value= "C" onClick="" ></td> <td><input type= "button" value= "=" onClick="" ></td> <td><input type= "button" value= "+" OnClick="" ></td> </table> </center> </body> <hr/> </html> how do i make the calculator work now
How to encode and decode URL strings?
how to copy form data between different pages
function to combine two or more arrays
how to create Expandable and Collapsible Menus
code to keep a page Out of the browser history