<html>
<body>
<iframe id="myFrame" src="/default.asp" name="iframe_a"></iframe>
<p>Click the button to change the name of the iframe.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("myFrame").name = "newIframeName";
document.getElementById("demo").innerHTML = "The name of the iframe was changed from 'iframe_a' to 'newIframeName'.";
}
</script>
</body>
</html>