Hello, I want to hide a text that contains "(numbers)", get a method, but only works on the first element, the others still showing, how to loop for all elements? follow my code
<div id="mydiv">
<a href="#" id="demo"> Mr Blue has a blue house, (0123dddddd4) and/ a blue car </a>
</div>
<div id="mydiv">
<a href="#" id="demo1"> Mr Blue has a blue house, (0123dddddd4) and/ a blue car </a>
</div>
<script>
function myFunction() {
var str = document.getElementById("demo").innerHTML;
var res = str.replace( /\(.*\)/, '' );
document.getElementById("demo").innerHTML = res;
}
</script>