织梦CMS - 轻松建站从此开始!

沙龙国际-沙龙国际娱乐-沙龙国际网上娱乐

当前位置: 主页 > 沙龙娱乐网 >

代码优化oooooo

时间:2017-07-18 06:43来源:未知 作者:admin 点击:
function mosaicZero(var num) { //根据num拼接字符串zero,数字num是几字符串zero就有几个0.num取值范围0-16 var zero = ""; if (num == 0) zero = "0"; if (num == 1) zero = "00"; if (num == 2) zero = "000"; if (num == 3) zero =
function mosaicZero(var num) {
    //根据num拼接字符串zero,数字num是几字符串zero就有几个0.num取值范围0-16
    var zero = "";
    if (num == 0) zero = "0";
    if (num == 1) zero = "00";
    if (num == 2) zero = "000";
    if (num == 3) zero = "0000";
    if (num == 4) zero = "00000";
    if (num == 5) zero = "000000";
    if (num == 6) zero = "0000000";
    if (num == 7) zero = "00000000";
    if (num == 8) zero = "000000000";
    if (num == 9) zero = "0000000000";
    if (num == 10) zero = "00000000000";
    if (num == 11) zero = "000000000000";
    if (num == 12) zero = "0000000000000";
    if (num == 13) zero = "00000000000000";
    if (num == 14) zero = "000000000000000";
    if (num == 15) zero = "0000000000000000";
    if (num == 16) zero = "00000000000000000";
    return zero;
}
织梦二维码生成器
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
推荐内容