If not for cross-site scripting restrictions this should work. Unfortunately I don't know of a way to get the URL without violating these restrictions.
<html>
<head>
<script type="text/javascript">
function GetIFrameUrl()
{
alert('url = ' + document.frames['frame1'].location.href);
}
</script>
</head>
<body>
<a href="#" onclick="GetIFrameUrl();">Find the iFrame URL</a>
<iframe name="frame1" src="http://www.google.com" width="100%" height="400"></iframe>
</body>
</html>