Access the current URL of an iframe

From CodeCodex

JavaScript[edit]

Supposing you have an iframe defined thus:

<iframe name="iframeName" width=... height=... src=...>
</iframe>

Then you can access and change the iframe URL string as:

OldURL = frames["iframeName"].location
frames["iframeName"].location = NewURL