Quote from the doc:
To perform a global search and replace, either include the g switch in
the regular expression or if the first parameter is a string, include
g in the flags parameter. Note:
The flags argument does not work in v8 Core (Chrome and Node.js) and will be removed from Firefox.
So it should be:
"11.111.11".replace(/\./g, '');
This version (at the moment of edit) does work in Firefox...
"11.111.11".replace('.', '', 'g');
... but, as noted at the very MDN page, its support will be dropped soon.