hw_2x_vc 发表于 2017-3-19 18:35:54

form的getdata不稳定

json = "{"_state":"","pk":"","pk_refer":"","paralist":"地方撒旦发","showname":"撒发顺丰","datetype":"c","exrp":">=","sourcetype":"7a5b3afc-0700-4865-b","norder":"1","startstop":"0","datasource":"select enumcode,enumvalue from cpsenum_b where pk_cpsenum='7a5b3afc-0700-4865-b'"}", o = Object {_state: "", pk: "", pk_refer: "", paralist: "地方撒旦发", showname: "撒发顺丰"…}

我的 的表单下面 有这样当个
<input id="_state" name="_state" class="mini-hidden" required="true" />
        <input id="pk" name="pk" class="mini-hidden" />
        <input id="pk_refer" name="pk_refer" class="mini-hidden" required="true" />



$("#_state").val(data.action);
            if (data.pk) {
                $("#pk").val(data.pk);
            }
            if (data.pk_refer) {
                $("#pk_refer").val(data.pk_refer);
            }
我用这段程序赋值 用getdata 就不能捕获值
var textobj = document.getElementById('datasource$text');
                            //textobj.innerText = lcSql;
                            textobj.value = lcSql;

                            var textobj = document.getElementById('datasource');
                            //textobj.innerText = lcSql;
                            if (textobj) {
                                textobj.value = lcSql;
                            }
用这段代码赋值也不能获取导致,手动录入就没有问题





正确的赋值代码应该怎么写 用form的setData 可以

dforce 发表于 2017-3-20 11:02:22

MiniUI控件的赋值请请使用MiniUI的方法
mini.get("_state").setValue(value)
mini.get("pk").setValue(value)
mini.get("pk_refer").setValue(value)

请不要使用jquery方式处理

hw_2x_vc 发表于 2017-3-20 13:35:21

dforce 发表于 2017-3-20 11:02 static/image/common/back.gif
MiniUI控件的赋值请请使用MiniUI的方法
mini.get("_state").setValue(value)
mini.get("pk").setValue(valu ...

原来是这样
页: [1]
查看完整版本: form的getdata不稳定