We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

CS101 assignment 2 solution on july 2016

<html>

<script language"javascript">
var num1;
var num2;
var sum;
function processVal1(){
num1 = document.calc.num.value;
num1 = parseInt(num1);
if(isNaN(num1)){
document.calc.num.value = null;
}
else{
document.getElementById("plus").disabled = true;
document.getElementById("equ").disabled = false;
document.getElementById("labl").innerHTML=""+num1+"+";
document.calc.num.value = null;
document.getElementById("num").focus();
}
}
num2 = document.calc.num.value;
num2 = parseInt(num2);
if(isNaN(num2)){
}
else{
sum = num1 + num2;
document.calc.num.value = sum;
document.getElementById("equ").disabled = true;
document.getElementById("plus").disabled = false;
}
}
function clearVal(){
document.getElementById("equ").disabled = false;
document.getElementById("plus").disabled = false;
document.getElementById("labl").innerHTML="&nbsp;";
document.calc.num.value = 0;
}

</script>
<body>
<form method="post" action="assignment.html" name="calc">
<table border="1" align="left" width="160px">
<tr>
<p id="labl">&nbsp;</p>
</tr>
<tr><td><input type="text" name="num" value="0" id="num"/></td>
</tr>
<tr>
<td>
<input type="button" name="add" value="+" onClick="processVal1();" id="plus" id="plus"/>
<input type="button" name="clr" value="C" onClick="clearVal();"/>
</td>
</tr>
<tr>
<td>
<input type="button" name="equ" value="=" onClick="addVal();" id="equ"/></td>
</tr>
</table>
</form>
</body>
</html>

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

Views: 1637

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Attachments:

Thank you :) :)

Latest Activity

21 seconds ago
26 seconds ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + "Jɨyą's discussion okey :x
46 seconds ago
1 minute ago
2 minutes ago
+ "αяsαℓ " Ќąƶµяɨ •" liked +¢αяєℓєѕѕ gιяℓ's discussion Jin sey Mohabbat Ho.....
2 minutes ago
2 minutes ago
3 minutes ago
3 minutes ago
3 minutes ago
4 minutes ago
4 minutes ago
4 minutes ago
+ "αяsαℓ " Ќąƶµяɨ •" liked + Iuuoɔǝut+'s discussion عشق
4 minutes ago
4 minutes ago
5 minutes ago
5 minutes ago
5 minutes ago
5 minutes ago

1

2

3