<script>
var code = "";
for(var i=0;i<6;i++){
var radom = Math.floor(Math.random()*10);
code += radom;
}
console.log(code);
</script>
转载于:https://www.cnblogs.com/wangshengli520/p/10562814.html