HoangNamMapper

Text2Imacros

Jul 20th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.46 KB | None | 0 0
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5.  
  6. <script>
  7. function c2MT () {
  8.  
  9. var mytext = '';
  10.  
  11. lines=document.getElementById("myta").value.split('\n')
  12.  
  13. for (var i=0; i < lines.length; i++) {
  14.  
  15. mytext = mytext + lines[i].replace(/ /g, '<SP>') + '<BR>';
  16. mytext = mytext.replace(/\r/,'');
  17. }
  18.  
  19. document.getElementById("myta").value = mytext;
  20.  
  21. }
  22. </script>
  23.  
  24. <textarea id=myta cols=80 rows=20>
  25. </textarea>
  26.  
  27. <button onClick="c2MT ();">Convert</button>
  28.  
  29. </body>
  30. </html>
Advertisement
Add Comment
Please, Sign In to add comment