This code is replace all of non-digit symbols in new_telephonenumber field to nothing, i.e. "".
//before: new_telephonenumber = "555-555$#5"
//after: new_telephonenumber = "5555555"
var re = /\D/g;
if(document.crmForm.all.new_telephonenumber.DataValue != null){
crmForm.all.new_telephonenumber.DataValue = crmForm.all.new_telephonenumber.DataValue.replace(re,"");
}
Комментариев нет:
Отправить комментарий