Java easyui 下拉框默认选中第一个
html代码:
<tr>
<td>
<div style="margin-bottom:5px">计价方式: <%--下拉框默认选中第一个--%>
<input type="text" id="cvaluetypeID" class="easyui-combobox" name="name"
data-options="valueField:'id',textField:'name',url:'/valuation/findAll',prompt: '请选择计价方式',required:true,editable:false" style="width:140px"/>
</div>
</td>
<td>
<div style="margin-bottom:5px;margin-left: 80px">
<input class="easyui-textbox" id="specification" name="specification" style="width:220px" data-options="label:'规格型号:'">
</div>
</td>
</tr>
js代码:
/*easyui-获取下拉框默认选中第一个*/
$("#cvaluetypeID").combobox({
onLoadSuccess:function (data) {
if(data){
$('#cvaluetypeID').combobox('select',data[0].id);
}
}
});
根据下拉框的ID来确认默认选中第一个
我的个人博客学习地址:欢迎大家来持续关注,互交友链!www.tianyuan518.cn
Java easyui 下拉框默认选中第一个的更多相关文章
- select获取下拉框的值 下拉框默认选中
本文主要介绍select下拉框的相关方法. 1.通过id获取下拉框的value和文本值 例如: <select class="form-control" id=" ...
- EXT学习之——EXT下拉框默认绑定第一个值
//默认第一个下拉框绑定值if (this.moduleCombo.store.getAt(0) != undefined) { this.moduleCombo.setValue(this.modu ...
- GridView 中绑定DropDownList ,下拉框默认选中Label的值
在GridView中,我们 有时候要绑定值. 前台绑定的代码可以这样 <asp:TemplateField HeaderText="当前状态" ItemStyle-Horiz ...
- jQuery实现下拉框默认选中
<form class="form-inline" method="post" action="/score_result/"> ...
- Easyui combobox下拉框默认选中第一项
var val = $(#cc).combobox("getData");for (var item in val[0]) { if (item == "gr ...
- angularjs中的下拉框默认选中
1. ng-init 属性: <!DOCTYPE html> <html> <head> <meta charset="utf-8"& ...
- 怎么给php下拉框默认选中
比如说一个个人信息的编辑界面,从php界面传来了性别的值是0, 而html上有0 1 两个option 怎么能把0的那个option加上属性selected 用的是模板, 不要用原生的嵌在html中的 ...
- EasyUI下拉框级联
EasyUI用来实现后台界面还是可以的,毕竟面对的是小众群体而非广大的用户,简单为美.这里想聊的功能是一种下拉框的联动,比如我选中了下拉框A的某一项,那么下拉框B的选项就是甲乙丙丁,如果我选了A的另一 ...
- 去除select下拉框默认样式
去除select下拉框默认样式 select { /*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/ border: solid 1px #; /*很关键:将默认的select选 ...
随机推荐
- [LC] 149. Max Points on a Line
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. ...
- 之前项目使用的轻量的goweb框架
技术栈 go 主开发语言 基于 gorilla 项目 javascript(nodejs) 部分小工具,josn对象转换,自动编译 C#,codesmith通用代码生成,生成最基本的crud和翻页. ...
- android cpu affinity
暂时无法获取当前线程运行在哪个CPU上,待调查... int omask = 0; int nmask = 0xF0; static void affinity() { int err; int sy ...
- Java 的 LinkedList 的底层数据结构
1. 数据结构--LinkedList源码摘要 public class LinkedList<E> extends AbstractSequentialList<E> imp ...
- [LC] 243. Shortest Word Distance
Given a list of words and two words word1 and word2, return the shortest distance between these two ...
- [LC] 191. Number of 1 Bits
Write a function that takes an unsigned integer and return the number of '1' bits it has (also known ...
- bat连接映射盘
net use h: \\IP地址\目录 "密码" /user:"用户名"
- 用JSON报的一个错误java.lang.ClassNotFoundException: org.apache.commons.lang.exception.NestableRuntimeExcep
以前在做项目的时候就曾接触过JSON的技术,但那个时候是项目经理把所有该配制的都配了,工具类也提供了,如何使用也跟我们说了,那个时候只是觉得很好用,倒没有研究过. 今天自己写了一个JSON的例子,可以 ...
- linux上hosts文件如何配置
linux上hosts文件如何配置 一.什么是host Hosts是一个没有扩展名的系统文件,其基本作用就是将一些常用的网址域名与其对应的IP地址建立一个关联“数据库”,当用户在浏览器中输入一个需要登 ...
- Hexo快速搭建博客
1. 准备工作 ~ 安装node.js -> npm -> hexo-cli ~ 安装git -> 版本控制工具 2. 更换npm(nodejs package manager)源 ...