Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div id='mydiv'>
<input type="button" value="Click Me" onclick="body_load();" />
</div>
<iframe id='loader'>
</iframe>
  
</body>
</html>
 
function body_load()
    {       
        document.getElementById('loader').contentWindow.alert("this is the iframe");
    }
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers