This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 14th, 2012  |  syntax: None  |  size: 0.88 KB  |  views: 32  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <div id="TestControl" contentEditable="true" style="width:200px; position:absolute; left:100; top:100; border: 1px solid #000;"></div>
  2. <div style="position:absolute; left:100; top:200; width:200px; border:1px solid #000; padding: 5px 5px 5px 5px;" id="displaydiv" ></div>
  3. <script>
  4. document.getElementById("TestControl").onkeyup = function() {
  5. document.getElementById("displaydiv").innerHTML = this.value;  
  6. }
  7. </script>
  8.        
  9. <div id="TestControl" contentEditable="true" style="width:200px; position:absolute; left:100; top:100; border: 1px solid #000;"></div>
  10. <div style="position:absolute; left:100; top:200; width:200px; border:1px solid #000; padding: 5px 5px 5px 5px;" id="displaydiv" ></div>
  11. <script>
  12. document.getElementById("TestControl").onkeyup = function() {
  13. document.getElementById("displaydiv").innerHTML = this.value || this.textContent || this.innerText || this.innerHTML;  
  14. }
  15. </script>
clone this paste RAW Paste Data