Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<html>
<head>
<script>
function loadFrame (elm){
    var frame1 = document.getElementById('frame1');
    frame1.src = elm.dataset.src;
}
</script>
</head>
<body>
    <button id="b1" data-src="http://www.w3schools.com" onClick="loadFrame(this)">Button 1</button>
    <button id="b2" data-src="http://www.sony.com" onClick="loadFrame(this)">Button 2</button>
    <iframe id="frame1" scrolling="no"></iframe>
</body>
</html>
Output 300px

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers