<html> <head> </head> <body> name: <input id="n" /> password: <input id="p" /> <button id="b">ok</button> <script> b.onclick=function(){ alert("Hello "+n.value+"!\nYour password is "+p.value+"\nToday is "+new Date()) } </script> </body> </html>