I want to know if it is possible to use the Id of an element if it is used
For example we have
<img id="image1" onclick="usarImagen();" class="img-responsive center-block" src="images\imagen1.jpg" alt="banner1" align="middle"/>
<img id="image2" onclick="usarImagen();" class="img-responsive center-block" src="images\imagen2.jpg" alt="banner2" align="middle"/>
<img id="image3" onclick="usarImagen();" class="img-responsive center-block" src="images\imagen3.jpg" alt="banner3" align="middle"/>
and that can be called like this:
...
function usarImagen() {
var image = document.getElementById("image*").value;
...
instead of specifying one by one and taking only the one that is used