need to make calculation such that when user enters the value "$" sign should be concatenated with that and when user enters 10.44 the o/p should be $10.44. if the user enters 10 the o/p should be $10.00 and if the user enters 100.21 the o/p should be $100.21 .. i need to do this using padding
Where is the calculation?
To concatenate the '$' character, it would be something like ...
var userValue = document.getElementById('userInput').value;
document.getElementById('displayCalc').value = '$'+userValue;
but it might vary depending upon your surrounding code
which I do not see.