P2S1 IT-Lab Experiment-7
P2S1 IT-Lab Experiment-7
INFORMATION TECHNLOGY
LAB-7(JAVA SCRIPT)
caption{font-size:40px;
color:white;
background-color:tomato;
border:1px solid black;
border-radius:5px;
text-transform:uppercase;}
button {
width: 100%;
padding: 20px 40px;
background-color:tomato;
color: white;
font-size: 24px;
font-weight: bold;
border: none;
border-radius: 5px;
}
input[type="text"] {
padding: 20px 30px;
font-size: 24px;
font-weight: bold;
border-radius: 5px;
border: 2px solid black;
}
5. Use the functions for each operations like AC button, backspace button,for entering numbers ,symbols and
= button.
6. You may use eval( ) function for = symbol to calculate the value.
Ex: eval(document.getElementById('res').value)
9. You may use function with one argument to entering the numbers and symbols in the result box.
Ex: function show(a)
{
document.getElementById('res').value+=a;
}
7.2 Create a application for calculating the percentage and grades by using Html,Css and JavaScript?
INSTRUCTIONS:
1. You may use table and div tags to create the above output format.
2. You may use following css selectors.
*{font-weight:bold;}
h1{text-decoration:underline;}
div{padding:30px;
position:center;
border:2px solid red;
margin-left:400px;
margin-right:500px;
background-color:lightgreen;
color:tomato;}
table{color:blue;}
button{color:blue;position:center;padding:5px;}
3. After entering obtained marks and total marks, if you click on calculate button, automatically we should get
percentage and grade in their respective fields according to their marks.
5. You may use switch statement or (else if ladder) to find the grades.