首页 > Web开发 > 详细

规则html表单对象赋值

时间:2016-08-11 13:09:35      阅读:219      评论:0      收藏:0      [点我收藏+]

function grid_load_callback(data, status) {
            if (data.rows.length > 0)
            {
                var inputlist = $(‘input‘);

               //获取数据对象,以循环赋值
                var obj=data.rows[0];
                for (var id in obj)
                {
                    if ($.objExists(‘txt‘ + id))
                        $.setValue(‘txt‘ + id, obj[id]);
                }
                //$.setValue("txtyaosi", ‘1‘);
            }
            // alert(JSON2.stringify(data));
            $("#dg").datagrid("loadData", data);
            $.closeWaiting();
        }

 

   objExists: function(id){
        if(this("#"+id).length>0)
            return true;
        else false;
    },
    setValue: function (id, value) {
        this("#" + id).val(value);
    },

规则html表单对象赋值

原文:http://www.cnblogs.com/jeffry/p/5760249.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!