I have inputmask that work perfectly if it get value by keypressed or input manually but what I cant do is when that input get value from controller or set by javasript
This is my input mask
$("#price, #sum").inputmask( "numeric", {
radixPoint: ",",
groupSeparator: ".",
digits: 2,
autoGroup: true,
prefix: 'Rp. ',
rightAlign: true,
oncleared: function () { self.Value(''); }
});
This is my input that get value from controller
<input id="price" name="price" type="text" class="form-control text-right" value="{{$create->price}}" required autofocus>
And last is my javascript to inject value
$('#sum').val(sum);
How I apply inputmask to that 2 condition with javascript ?
我只需要将这种类型的输入更改为文本,如下所示:
<input id="price" name="price" type="text" class="form-control text-right" value="{{$create->price}}" required autofocus>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.