Math问题:怎么设置成,我点一次,就更新一次数,我现在弄得是只能点一次
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Mathint </title> <script type="text/javascript"> var i=Math.random()*10; function abc(){ document.write(Math.round(i)); } </script> </head> <body> <input type="button" value="刷新" onclick="abc()"> </body> </html>