Adding a pound sign to an input – jquery

Trying to format this input to display as monies, with a pound sign, I have the decimal place and 2 zeroes formatted – with the following:

function isPrice(el){
    val = parseFloat(el.value);
    if (!isNaN(val)){
        el.value = parseFloat(el.value).toFixed(2);

Been quite stuck on this..Thank you !


You can either create your own/ use the below regex to include the pound sign:

return "£" + value.toFixed(2).replace(/d(?=(d{3})+.)/g, "$&,");


get the jquery plugin for currency formatting described here.

PS: If you just want the Pound sign in input fields, you have to use the character code. For Pound, it is u00A3. So:


Leave a Reply

Your email address will not be published. Required fields are marked *