bootstrat 设置 select option 选项的值
<script>
/**
//把textarea替换成一个编辑器
UE.getEditor('22upTips',{
initialFrameWidth:"80%",
initialFrameHeight:"200"
});
**/
$(document).ready(function() {
//select change
$("#app_type").change(function(){
var app_type=$(this).val();
var url="./index.php?module=operation&action=SelectChange";
var post_value = "app_type="+app_type;
$.ajax({
type: "POST",
url: url,
data: post_value,
dataType: 'json',
success: function(data){
//清空option
$("#upVer").empty();
if(data==0){
alert('更新失败');
}else{
$(data).each(function(k,v){
//设置option选项
document.getElementById("upVer").innerHTML +=v[0].option;
$("#mainVer").val(v.mainVer);
$("#upTips").val(v.upTips);
$("#assetPath").val(v.assetPath);
$("#newUpiniPath").val(v.newUpiniPath);
$("#appStore").val(v.appStore);
$("#forceUpdateVersion").val(v.forceUpdateVersion); });
//刷新
$('#upVer').selectpicker('refresh');
}
}
});
}); });
</script>
相关资料:http://silviomoreto.github.io/bootstrap-select/
bootstrat 设置 select option 选项的值的更多相关文章
- 通过匹配绑定select option的文本值 模糊匹配
//通过匹配绑定select option的文本值 模糊匹配 $(".class option:contains('文本值')").attr("selected" ...
- 获取和设置select和checkbox的值
if ($("input[name = 'recpower']").prop("checked") == true) //获取checkbox值 { data. ...
- jquery操作select(option)的取值,设置和选中
比如 <select class="selector"> <option value ="volvo">Volvo</option ...
- jQuery 设置select,radio的值,无法自动触发绑定的change事件
一.问题 今天在对select和radio做change事件绑定后,手动设置其value值,但是不能触发change事件 二.解决 使用trigger方法手动触发
- 遍历input。select option 选中的值
<label> <input name="Fruit" type="radio" value="0" class=&quo ...
- 让innerHTML获取的内容包含input和select(option)的最新值
function refreshData(){ var allInputObject=document.body.getElementsByTagName("input"); fo ...
- servlet里获得jsp页面里select的选项之值
<span style="font-size:24px;"><select name=first> <option value="1&quo ...
- 根据输出设置select的被选中值
$("#startupStatus").find("option").map(function(i) { if ($('#st-status').val() = ...
- select初始化添加option,通过标签给出回显值,由于回显值和初始化值option中有一个值重复,去重等问题!
第一张图片: 第二张图片 /** *该方法是为了去重,所谓去重就是 因为回显给select附上了值并设置为selected选中状态,而在我们初始化所有的select添加option元素中于回显的值重复 ...
随机推荐
- Map集合-根据宠物昵称查找宠物
package collection; /** * 宠物类 * @author * */ public class Pet { private String name; private String ...
- OVF? OVA? VMDK? – File Formats and Tools for Virtualization
I recently worked on a project to create a “virtual appliance” for one of our customers. They have a ...
- IE8下 input标签内padding失效
在做网页兼容时 发现在ie8下的input内用padding失效 为了达到居中文字的效果 使用line-height可以解决问题
- 【mybatis】mybatis中的<if test=“”>test中多条件
mybatis中的<if test=“”>test中多条件 代码展示: 其中 accountCode和apiName都是ApiAllRespBean的属性 <select id=&q ...
- 学号20175313 《数据库MySQL(课下作业,必做)》第十周
目录 一.题目要求 二.需求分析 三.关键代码以及运行结果截图 任务一 任务二 任务三 任务四 四.代码实现过程中遇到的问题及其解决方法 五.码云链接 六.心得体会 一.题目要求 下载附件中的worl ...
- 阿里蚂蚁的前端ant-design
蚂蚁国内镜像: http://ant-design.gitee.io/components/date-picker-cn/ 阿里的设计平台:https://design.alipay.com/deve ...
- UVA 1665 Islands
题意:输入一个n*m矩阵,每一个格子都有一个正整数,再输入T个整数ti,对于每一个ti,输出大于ti的正整数组成多少个四连快 思路:正着做的话事实上相当于删除连通块,而假设反着做的话就相当于变成添加连 ...
- C# 窗体位置 Show和ShowDialog (转载)
CenterParent 窗体在其父窗体中居中. CenterScreen 窗体在当前显示窗口中居中,其尺寸在 ...
- Elasticsearch 索引实例
1.简述 ElasticSearch包含了一系列的感念,比如索引(indexing).搜索(search)以及聚合(aggregations),现在我们主要介绍indexing. 在Elasticse ...
- Unity里面的自动寻路(二)
接着我的 上一篇自动寻路文章,这一次我们就来学习一下与自动寻路有关的组件吧.Unity中与自动寻路相关的组件主要有两个:NavMeshAgent ( 又称导航网格代理 ),Off Mesh Link ...