avalonjs

        var vm = avalon.define({
            $id: "login",
            username: "",
            password: "",
            message: '',
            url: 'javascript:void(0)',
            
            bigUsername: function () {
                var username = vm.username;
                var str ='';
                for (var i = 0; i < username.length && i < 6; i += 6) {
                    str += username.substr(i,6) + " ";
                }
                for (var i = 6; i < username.length && i < 14; i += 8) {
                    str += username.substr(i, 8) + " ";
                }
                for (var i = 14; i < username.length && i < 18; i += 4) {
                    str += username.substr(i, 4) + " ";
                }
                return str;
            },

 

posted @ 2016-10-16 12:04  shiningrise  阅读(217)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css