I have a table of 4 images that change on click. I was wondering how I could check to see if/when all images in the table are the same image source. I am stuck trying to figure out a way to check all image sources in the table. Any advice is appreciated!
HTML:
<table>
    <tr>
        <td>
            <img id="pos1" src="slicedImg_01.gif" onclick="change(1)" />
            <img id="pos2" src="slicedImg_02.gif" onclick="change(2)" />
        </td>
    <tr>
        <td>
            <img id="pos3" src="slicedImg_03.gif" onclick="change(3)" />
            <img id="pos4" src="slicedImg_04.gif" onclick="change(4)" />
        </td>   
    </tr>       
    </tr>
</table>    
JS:
var v = document.getElementById("pos" + clicked_img).src = "slicedImg_0" + rNum + ".gif";
        //var elems = document.getElementsByName.images("f")[0].src;
        //alert(elems);
        if (document.getElementById("pos1").src ==  v){
            if (document.getElementById("pos2").src == v){
                if (document.getElementById("pos3").src == v)
Don't mind my trial and error attempts on the page.
 
     
     
    