目录

图片按钮(ImageButton)

功能说明

该控件为图片按钮

HTML5

  1. <input id="imagebutton0" value="图标名称" istogglebutton="false" type="imagebutton" checked="false"/>

属性列表

属性名 属性值 说明
value 按钮的文字
istogglebutton true/false 是否true:该控件支持按下/非按下状态;false:普通控件,即支持默认态和触屏态
checked true/false rue为选中状态,false为未选中状态
imagebuttontype icontext/icon/text 图片按钮显示类型(icontext:图片+文本,icon:图片,text:文本)
bindfield 控件绑定字段
icon-background-image 图标路径
icon-pressed-image 按下状态图标路径
color “#000000” 文字颜色
font-pressed-color “#FF0000” 按下状态文字颜色
background-image “#000000” 普通状态下的背景图片
pressed-image “#FF0000” 按下时的背景图片

支持公共属性
参见公共属性说明

事件列表

事件名 说明
onclik 点击事件

支持公共事件
参见公共事件说明

实例

1、获得与设置按钮选中状态

  1. <input id="imagebutton0" value="图标名称" istogglebutton="true" type="imagebutton" checked="false"/>
  1. $id("imagebutton0").get("checked");//返回true为选中,false为未选中
  2. $id("imagebutton0").set("checked", "true") //设置选中
  3. $id("imagebutton0").set("checked", "false")//设置未选中
文档更新时间: 2018-01-12 16:31