Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Test</title>
- </head>
- <body >
- <! Age Calculator Start-->
- <h2>Age Calculator</h2>
- <label for="birthyear">Birth Year</lable>
- <input type="text" id="birthyear"><br><br>
- <label for="Year">Current Year</lable>
- <input type="text" id="curryear" onFocus="curyear()">
- <h4>Your Age is </h4><h3 id="result"></h3>
- <input type="button" id="calculate" value="Calculate" onClick="Agecalculate()">
- <! Age Calculator End-->
- <! Supply Calculator Start-->
- <h2>Supply Calculator</h2>
- <label for="snack">Enter Your Fav Snack</lable>
- <input type="text" id="snack"><br><br>
- <label for="age">Age</lable>
- <input type="text" id="age"><br><br>
- <label for="amt">Amount Per Day</lable>
- <input type="text" id="amt">
- <h4>Your Estimated Comsumption by your favourite</h4><h4 id="SnackName"></h4><h4> is </h4><h3 id="SnackResult"></h3>
- <input type="button" id="Supcalculate" value="Calculate" onClick="Supcalculate()">
- <! Supply Calculator End-->
- <! Circle Properties Calculator Start-->
- <h2>Circle Properties Calculator</h2>
- <label for="cir">Enter the Radius</lable>
- <input type="text" id="rad"><br><br>
- <h2>Circumference</h2>
- <h4>Circumference is </h4><h3 id="Circum"></h3>
- <h2>Area</h2>
- <h4>Area is </h4><h3 id="Area"></h3>
- <input type="button" id="Circlecalculate" value="Calculate" onClick="Circle()">
- <! Circle Properties Calculator End-->
- <! Temperature Calculator Start-->
- <h2>Temperature Calculator</h2>
- <h1> F - C </h1>
- <label for="temp">Farenheit</lable>
- <input type="text" id="far" onchange="TempFC()"><br><br>
- <label for="temp">Celcius</lable>
- <input type="text" id="cel"><br><br>
- <br>
- <h1> C - F </h1>
- <label for="temp">Celcius</lable>
- <input type="text" id="cel1" onchange="TempCF()"><br><br>
- <label for="temp">Farenheit</lable>
- <input type="text" id="far1"><br><br>
- <! Temperature Calculator End-->
- </body>
- <script language="javascript" type="text/javascript">
- /* Age Calculator Script Start */
- function Agecalculate()
- {
- var a,b,c;
- a=document.getElementById('birthyear').value;
- b=document.getElementById('curryear').value;
- c=b-a;
- document.getElementById('result').innerHTML=c;
- }
- function curyear()
- {
- var d= new Date();
- var y= d.getFullYear();
- document.getElementById("curryear").value=y;
- }
- /* Age Calculator Script End */
- /* Supply Calculator Script Start */
- function Supcalculate()
- {
- var a,b,c,name,n;
- name=document.getElementById('snack').value;
- a=document.getElementById('age').value;
- b=document.getElementById('amt').value;
- n=2080-a;
- c=365*n*b;
- document.getElementById('SnackName').innerHTML=name;
- document.getElementById('SnackResult').innerHTML="Rs."+c;
- }
- /* Supply Calculator Script End */
- /* Circle Properties Calculator Script Start */
- function Circle()
- {
- var r,b,c;
- r=document.getElementById('rad').value;
- b=3.14*r*r;
- c=2*3.14*r;
- document.getElementById('Circum').innerHTML=b;
- document.getElementById('Area').innerHTML=c;
- }
- /* Circle Properties Calculator Script End */
- /* Temperature Calculator Script Start */
- function TempFC()
- {
- var a,b;
- a=document.getElementById('far').value;
- b=(((a-32)*5)/9);
- document.getElementById('cel').value=b;
- }
- function TempCF()
- {
- var d,e;
- d=document.getElementById('cel1').value;
- e=(((d*9)/5)+32);
- document.getElementById('far1').value=e;
- }
- /* Temperature Calculator Script End */
- </script>
- </html>
Add Comment
Please, Sign In to add comment