Thursday 18 August 2016

Remove Non numbers in input values in jquery



Remove Non numbers in input values in jquery

if (/\D/g.test(this.value))
{
   
// Filter non-digits from input value.
   
this.value = this.value.replace(/\D/g, '');
}

Friday 29 July 2016

Get dropdown value, text in jquery

Get dropdown value, text in jquery


jQuery(".cls_name option:selected").attr('name');

jQuery(".cls_name option:selected").text();