[Client H5 interaction] .replaceAll' is undefined, .replaceAll is not a function

If you are like me, adding regularity to replaceAll may cause this error to be reported.

You can use the replace method. If you want to replace all the regular expressions, add /g after the regular expression

         let reg=/\(|-|\)|\s/g;
        $("#telphone").val(number.toString().replace(reg,''));

Guess you like

Origin blog.csdn.net/mudarn/article/details/118524896