js 随机数 <script language="javascript">var num=Math.random();var newNum =num.toFixed(2);alert(newNum); </script>php随机数<?php$num= rand(0,100)/100;$newNum = sprintf("%.2f",$num);echo $newNum;?>