Advertisement
LightProgrammer000

Retorno [Prompt]

Jan 24th, 2019
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2.  
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.  
  5.     <head>
  6.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7.         <title> Testando JavaScript </title>
  8.  
  9.         <style> </style>
  10.  
  11.         <script type="text/javascript">
  12.  
  13.             var mensagem;
  14.             var retorno = confirm("Clique em um dos botões !");
  15.  
  16.             if( retorno == true )
  17.             {
  18.                 mensagem = "Operação Confirmada";            
  19.             }
  20.  
  21.             else
  22.             {
  23.                 mensagem = "Operação Cancelada";
  24.             }
  25.  
  26.             document.write(mensagem);
  27.  
  28.         </script>        
  29.     </head>
  30.  
  31. <body>
  32.  
  33. </body>
  34.  
  35. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement