How to set numeric value containing comma and decimal point to an input
type number
I have an input tag in html
<input type="number" id="Amount" placeholder="Please enter somthing" />
I am setting value of this input using jQuery like :
$('#Amount').val("78,000.00");
I am unable to set this value unless I change the type of input tag to be
"text". I have also applied pattern regix like :
<input type="number" id="Amount" placeholder="Please...."
pattern="/^[0-9.,]+$/" />
Please help me to solve this problem.
No comments:
Post a Comment