码迷,mamicode.com
首页 > Web开发 > 详细

avalonjs

时间:2016-10-16 13:46:44      阅读:281      评论:0      收藏:0      [点我收藏+]

标签:

        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;
            },

 

avalonjs

标签:

原文地址:http://www.cnblogs.com/shiningrise/p/5966318.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!