<body> <script> var Digital=new Date() var hours=Digital.getHours() if (hours>=6&&hours<=12) document.write('Bom dia.') else if (hours>=12&&hours<=18) document.write('Boa tarde') else if (hours>=18&&hours<=22) document.write('Boa noite.') else document.write('Boa madrugada.') </script> </body>