为什么这样点击刷新按钮后随机数会出现,但按钮不见了?
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Math </title> </head> <body> <input name="hah" type="button" value="刷新" onclick="newNum()"/> <script type="text/javascript"> function newNum(){ document.write(Math.random()); } </script> </body> </html>