diff --git a/day.js b/day.js new file mode 100644 index 0000000..3de8d98 --- /dev/null +++ b/day.js @@ -0,0 +1,27 @@ + +//var x= document.getElementById('Age').value; +//if (x<50000) +//document.write('basic salary'); +//if (x>50000) +//document.write('huge salary'); + +document.getElementById('submit').addEventListener('click', function(e){ + e.preventDefault(); + + var x= document.getElementById('Salary').value; + var y=document.getElementById('output'); + if (x<50000){ + y.append('Basic salary'); + } + else if (x<200000){ + y.append('Mid Earner'); + + } + else{ + y.append('High Earner'); + y='High Earner' + } + + + +}) diff --git a/index.html b/index.html new file mode 100644 index 0000000..3ae4171 --- /dev/null +++ b/index.html @@ -0,0 +1,25 @@ + + +
+ + + +