I have 2 input fields val\_1 and val\_2 and select options. The application needs to compute the result of the inputs based on the selected option.

```js
    function calOparan(b){
      var sel_opera = b.options[b.selectedIndex].value;
        if(sel_opera=="Addition"){
            var sel_opera = "+";
        }
        if(sel_opera=="Subtraction"){
            var sel_opera = "-";
        }
        if(sel_opera=="Mutiplication"){
            var sel_opera = "*";
        }
        if(sel_opera=="Division"){
            var sel_opera = "/";
        }
        //document.getElementById("total_val").innerHTML=sel_opera;
        return sel_opera;
    }

    function calculateNow(){
        var opr = calOparan();
        var val_1 = document.getElementById('val_1').value;
        var val_2 = document.getElementById("val_2").value = (val_1 - (val_1/100)*2).toFixed(2);
        var result = val_1 + opr + val_2;
        document.getElementById('total_val').inner.HTML= result;
    }
```

```html
<!-- Calculator -->
<select name="mySelect" id="selectOperation" onChange="calOparan(this)">
  <option disabled selected>Select your Operation</option>
  <option value="Addition"> Addition </option>
  <option value="Subtraction"> Subtraction </option>
  <option value="Mutiplication"> Mutiplication </option>
  <option value="Division"> Division </option>
</select>

<input type="number" id="val_1" name="val_1" onKeyUp="calculateNow()">
<input type="text" id="val_2" name="val_2" onKeyUp="calculateNow()">
<p id="total_val"></p>
```

When `onKeyUp` I want the result to be displayed on the page.