document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. // Refer to UI elements
  2. var button = document.getElementById(\'MyButton\');
  3. var txtInput = document.getElementById(\'MyInputText\');
  4.  
  5. // Bind click event of the button with an event listerner
  6. button.addEventListener(\'click\', function () {
  7.     \'use strict\';
  8.     var text = txtInput.value;
  9.  
  10.     // Show alert box with this text
  11.     window.alert(text);
  12. })();
');