I have a html page structure something like this,
<body>
<table id = "a">
<tr>
<td id = "x"></td>
<td id = "b">
<div id = "y"></div>
<div id = "c">
<iframe id = "d"/>
</div>
</td>
</tr>
</table>
</body>
I have tried using getElementById()
on all elements then,
var iframe = document.getElementById('d');
iframe.src = iframe.src;
But, the getElementById()
returns null
. Please help!
PS: iframe is from the same domain. Need strictly JS code. No JQuery please.
Edit: How can i access the iframe ?