js 随机生成 日本手机号

180it 2021-04-21 PM 780℃ 0条

<script>

function japanmobile() {

var seed = '0123456789',
i = 0,
len = seed.length,
max = 11,
rs = '',
min = 0;
var def = new Array('050', '080', '090', '070', '020', '060');
var st = 0;
if (st == 0) rs = def[Math.floor(Math.random() * def.length)].toString();
else rs = st.toString();
min = rs.length;
for (i = 0; i < max - min; i++) rs += seed.substr(Math.floor(Math.random() * len), 1);
//document.getElementById('japanmobiles').value = rs;

document.write(rs);

}

japanmobile();
</script>

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

js 随机生成 日本手机号