JSFiddle - React, Tailwind, and code Playground
by Satpal Singh
HTML
<table>
<tr>
<td>
<button value="page1.html" id="iframelink" onclick="SetSrc(this)">
<p>image1</p>
<img src="thumb1.jpg" title="" />
</button>
</td>
<td>
<button value="page2.html" id="iframelink" onclick="SetSrc(this)">
<p>image2</p>
<img src="thumb2.jpg" />
</button>
</td>
<td>
<button value="page3.html" id="iframelink" onclick="SetSrc(this)">
<p>image3</p>
<img src="thumb3.jpg" />
</button>
</td>
</tr>
</table>
JavaScript
function SetSrc(obj) {
//document.getElementById("myIframe").src =
alert(obj.value);
}