<!DOCTYPE html> <html> <body> <iframe id="myframe" src="/default.asp" name="myframe"> <p>Your browser does not support iframes.</p> </iframe> <p>The name of the iframe is: <script> document.write(document.getElementById("myframe").name); </script> <p> </body> </html>