Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<head>
<script type="text/javascript">
function myFunction(text) 
{
elem = document.getElementById('replace');
elem.innerHTML = text
}
  
</script>
</head>
<body>
<button onclick="myFunction('This is what I want to Show')">Press</button>
<button onclick="myFunction('This is something else I want to Show')">Press Again</button>
<div id="replace">
Test
</div>
</body>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers