Web Form Validations Help

Hi All,

I Tried all the documentation to create custom script to perform some calculations In
Web Form.
But Nothing works.
Please help me with some example code to calculate and display some values as follow:

I have 3 inputs: 1.Share price 2.Quantity 3.Total Amount

if I enter Share price And Quantity , Total amount will be Share price * quantity.

I tried so many example codes but not working.

please help me with this.