yagoloko
6/10/2015 - 12:30 PM

JS Bin// source http://jsbin.com/qevigu

JS Bin// source http://jsbin.com/qevigu

function changeTheText(){
  //Change the paragraph text
  
  document.getElementById('paragraphText2').innerHTML = 'we changed the text';
  
}
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <p id='paragraphText'>This is awesome</p>
   <p id='paragraphText2'>This is awesome</p>
  
  <button onclick='changeTheText()'>Change the text</button>

<script id="jsbin-javascript">
function changeTheText(){
  //Change the paragraph text
  
  document.getElementById('paragraphText2').innerHTML = 'we changed the text';
  
}
</script>



<script id="jsbin-source-javascript" type="text/javascript">function changeTheText(){
  //Change the paragraph text
  
  document.getElementById('paragraphText2').innerHTML = 'we changed the text';
  
}</script></body>
</html>