<body bgcolor="#EFE7D6"> <form> <input type="button" onclick="newSrc()" value="Change frame source"> </form> <p>Right-click inside the two frames and select "View Source" to see the source code.</p> </body>
</html>
跳出框架
<html> <head> <script type="text/javascript"> function breakout() { if (window.top!=window.self) { window.top.location="tryjs_breakout.htm" } } </script> </head>
<body> <form> Click the button to break out of the frame: <input type="button" onclick="breakout()" value="Break out!"> </form> </body>