搜索(Search)
功能说明
该控件用于搜索文本内容。
HTML5
<search id="search0" placeholder="搜索"/><search id="search0" placeholder="搜索" keyword="新闻"/>
属性列表
| 属性名 | 属性值 | 说明 |
|---|---|---|
| keword | 搜索控件默认的关键字 | |
| placeholder | 未获得焦点时的提示文本信息,即预置文本 | |
| value | 含义同keyword | |
| localstorage | 是否保存搜索的关键词 | |
| bindfield | 控件绑定字段 |
支持公共属性
参见公共属性说明
事件列表
| 事件名 | 说明 |
|---|---|
| onsearch | 执行搜索触发的事件 |
支持公共事件
参见公共事件说明
实例
1、onsearch事件的使用
<search id="search0" placeholder="搜索学校名称" keyword="" onsearch="select()"/>
//搜索框进行搜索操作function select(sender, args) {$id("search0").set("placeholder");//设置输入框默认提示$id("search0").get("keyword");//也可以通过value获得$id("search0").get("value");}
文档更新时间: 2018-01-15 14:31