Crew algemeen |
|
Ik denk dat dit dan makkelijker is:
window.addEventListener('DOMContentLoaded', function () {
elements = document.getElementsByTagName('input');
for (var i = 0; i < elements.length; ++i) {
elements[i].onkeyup = function (e) {
while (e.target.value.indexOf('.') >= 0) {
e.target.value = e.target.value.replace('.', ',');
}
}
}
}, false);
window.addEventListener('DOMContentLoaded', function () { elements = document.getElementsByTagName('input'); for (var i = 0; i < elements.length; ++i) { elements[i].onkeyup = function (e) { while (e.target.value.indexOf('.') >= 0) { e.target.value = e.target.value.replace('.', ','); } } } }, false);
|