Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions Stopwatch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
let sec=0;
let min=0;
let hr=0;
let displaySec=0;
let displayMin=0;
let displayHr=0;
let interval= null;
let status= "stopped";
function stopwatch(){
sec++;
if(sec/60 === 1){
sec=0;
min++;
if(min/60 === 1){
min=0;
hr++;
}
}
if(sec<10){
displaySec="0" + sec.toString();
}
else {
displaySec=sec;
}
if(min<10){
displayMin="0" + min.toString();
}
else {
displayMin=min;
}
if(hr<10){
displayHr="0" + hr.toString();
}
else {
displayHr=hr;
}
document.getElementById("display").innerHTML = displayHr + ":" + displayMin + ":" + displaySec;
}
function startstop(){
if(status==="stopped"){
interval=window.setInterval(stopwatch,1000);
document.getElementById("startstop").innerHTML="Stop";
status="started";
}
else{
window.clearInterval(interval);
document.getElementById("startstop").innerHTML="Start";
status="stopped";
}
}
function reset(){
window.clearInterval(interval);
sec=0;
min=0;
hr=0;
document.getElementById("display").innerHTML="00:00:00";
document.getElementById("startstop").innerHTML="Start";
}
16 changes: 16 additions & 0 deletions newStopwatch.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<html>
<head>
<title>Stopwatch</title>
<script type="text/javascript" src="Stopwatch.js"></script>
</head>
<body>
<div>
<div id="display">
00:00:00
</div>
<div class="button">
<button id="startstop" onclick="startstop()">Start</button> <button id="reset" onclick="reset()">Reset</button>
</div>
</div>
</body>
</html>
22 changes: 22 additions & 0 deletions registration.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<html>
<head>
<title>registration form</title>
</head>
<body><center>
<form action="test.html" method="get">
Name: <input type="text" placeholder="enter your name" id="name" name="name"><br>
Surname: <input type="text" placeholder="enter your surname" id="sur" name="sur"><br>
Gender: <input type="radio" id="m" name="g"> M
<input type="radio" id="f" name="g"> F<br>
Address:<textarea placeholder="enter your address" id=address" name="address"></textarea> <br>
Contact: <input type="number" maxlength="10" id="contact" name="contact"><br>
City: <select>
<option> Indore </option>
<option> Other </option>
</select><br>
<input type="submit" value="register">
</form>
</center></body>
</html>


54 changes: 54 additions & 0 deletions sijquery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<html>
<head>
<title>Simple Interest Calculation</title>
<script type="text/javascript" src="F:\avani\html\jquery.txt"></script>
</head>
<body>
<form id="myForm">
<table border = "0" width = 300px>
<tr>
<td>
Amount:
</td>
<td>
<input type="text" id="p">
</td>
</tr>
<tr>
<td>
Rate:
</td>
<td>
<input type="text" id="r">
</td>
</tr>
<tr>
<td>
No. of Years:
</td>
<td>
<input type="text" id="t">
</td>
</tr>
</table>
</form>
<button id="calculate">Calculate</button> <button id="clear">Clear</button>
<p id="result"></p>
</body>
<script>
$(document).ready(function(){
$("#calculate").click(function(){
var p = $("#p").val();
var r = $("#r").val();
var t = $("#t").val();
var result = ((+p) * (+t) * (+r)) / 100;
$("#result").html("Amount is "+ p +"<br>Rate is "+ r +"<br>Time is "+ t +"<br>The interest is " + result);
});
$("#clear").click(function(){
$("#myForm").closest('form').find("input[type=text], textarea").val("");
$("#result").html("");
});

});
</script>
</html>
50 changes: 50 additions & 0 deletions simpleinterest.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

<html>
<head>
<title>Simple Interest Calculation</title>
</head>
<body>
<form id="myForm">
<table border = "0" width = 300px>
<tr>
<td>
Amount:
</td>
<td>
<input type="text" id="p">
</td>
</tr>
<tr>
<td>
Rate:
</td>
<td>
<input type="text" id="r">
</td>
</tr>
<tr>
<td>
No. of Years:
</td>
<td>
<input type="text" id="t">
</td>
</tr>
</table>
<button onclick="document.getElementById('myForm').value = ''">Clear</button>
</form>
<p>
<button onClick="calculate()">Calculate</button>
</p>
<p id="result"></p>
</body>
<script>
function calculate(){
p = document.getElementById("p").value; //check this one and corrent it
r = document.getElementById("r").value;
t = document.getElementById("t").value;
result = document.getElementById("result");
result.innerHTML = "Amount is "+ p +"<br>Rate is "+ r +"<br>Time is "+ t +"<br>The interest is " + (p*r*t/100);
}
</script>
</html>
3 changes: 3 additions & 0 deletions test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<html>
this is test
</html>
34 changes: 34 additions & 0 deletions transform.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html>
<head>
<title> Rotation and Scale effect in CSS</title>
<style>
@-webkit-keyframes rotateIn {
0% {
-webkit-transform: rotate(0deg) scale(1,1);
}

100%{
-webkit-transform:rotate(360deg) scale(2,2) ;
}
}
.rotateIn:hover {
-webkit-animation-name: rotateIn;
}
.animated {
-webkit-animation-duration: 10s;
}
</style>
</head>
<body>
<div class = "animated rotateIn" >
<img src="1.jpg"><br>
</div>
<div class = "animated rotateIn">
<img src="2.jpg"><br>
</div>
<div class = "animated rotateIn">
<img src="3.jpeg"><br>
</div>
</body>
</html>