function abc(){
var number1,number2,sum,sum1,sum2,label2,label1,tc;
label1 = document.getElementById("label1").textContent;
label2 = document.getElementById("label2").textContent;
number1 = document.getElementById("textbox1").value;
number2 = document.getElementById("textbox2").value;
number1 = Number(number1);
number2 = Number(number2);
sum1 = number1 * label1;
sum2 = number2 * label2;
sum = Number(sum1) + Number(sum2);
sum = Number(sum);
if (number1>100|| number<0 || number2>100 || number<0) {
alert(sum);
} else {
alert("888");
}
- }function abc(){
- var number1,number2,sum,sum1,sum2,label2,label1,tc;
- label1 = document.getElementById("label1").textContent;
- label2 = document.getElementById("label2").textContent;
- number1 = document.getElementById("textbox1").value;
- number2 = document.getElementById("textbox2").value;
- number1 = Number(number1);
- number2 = Number(number2);
- sum1 = number1 * label1;
- sum2 = number2 * label2;
- sum = Number(sum1) + Number(sum2);
- sum = Number(sum);
- if (number1>100|| number<0 || number2>100 || number<0) {
- alert(sum);
- } else {
- alert("888");
- }
-
-
- }