whiplk

[CODE] - Textarea use (forStudies.)

May 18th, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Mostra em um alert() o que vocĂȘ digitou na textarea.
  2.  
  3. <html>
  4.    
  5.     <script type="text/javascript">
  6.  
  7.     function showElement()
  8.     {
  9.         var getText = document.getElementById("text").value;
  10.         if ( !getText )
  11.         {
  12.             alert("Erro, valor NULO");
  13.         }
  14.         else
  15.         {
  16.             alert("VocĂȘ digitou: " + getText);
  17.         }
  18.     }
  19.     </script>
  20. <textarea id="text" colls="6" rows="5"></textarea><br>
  21. <input type="button" value="Clique aqui!" onclick="showElement()" />
  22.  
  23. </html>
Advertisement
Add Comment
Please, Sign In to add comment