控件
更新时间: 2024-02-05 浏览次数: {{ hits }}

控件取值/赋值

示例:

this.F0000002.GetValue(); //获取控件值,   F0000002为控件编码

this.F0000002.GetText();//获取控件文本值,   F0000002为控件编码

this.F0000002.SetValue("");//控件赋值, F0000002为控件编码

 

控件权限

示例:

this.F0000002.SetReadonly(true); //设置不可写,   F0000002为控件编码

this.F0000002.SetVisible(false);//设置不可见,   F0000002为控件编码

 

下拉框、复选框、单选框控件

示例:

this.F0000002.ClearItems(); //清除选项,   F0000002为控件编码

this.F0000002.AddItem("选项1");//添加选项, F0000002为控件编码

 

绑定控件变化事件

注意:BindChange应写在表单前端OnLoad事件里,BindChange第一个参数key为任意的一个不重复字符串。

示例:

var that = this;

that.F0000002.BindChange( "key", function() {

   //此处是回调函数,要将this换成上面定义的that

 

   //获取值

   var value1 =   that.F0000002.GetValue();

 

   //设置值

     that.F0000003.SetValue(value1);

});