SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title> Filtrowanie tekstu </title>
  4. <meta charset="utf-8">
  5. <script type="text/javascript">
  6.     function filtrowanie(sText) {
  7.         var slowo = /szkola|chlebek|piciu/gi;
  8.         return sText.replace(slowo, "****");
  9.         }
  10.        
  11.         function pokaztekst(){
  12.         var wejscie1 = document.getElementById("txt1");
  13.         var wejscie2 = document.getElementById("txt2");
  14.         wejscie2.value = filtrowanie(wejscie1.value);
  15.         }
  16.         </script>
  17. </head>
  18.  
  19. <body>
  20. <h1> Wprowad┼║ tekst do filtrowania </h1>
  21. <textarea rows="10" cols="50" id="txt1"> </textarea> </br>
  22. <input type="button" value="Filtruj" onClick="pokaztekst()">
  23. <p> Tekst po filtrowaniu: </br>
  24. <textarea rows="10" cols="50" id="txt2"> </textarea> </p>
  25. </body>
  26. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top