<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 选项的值的更多相关文章

  1. 通过匹配绑定select option的文本值 模糊匹配

    //通过匹配绑定select option的文本值 模糊匹配 $(".class option:contains('文本值')").attr("selected" ...

  2. 获取和设置select和checkbox的值

    if ($("input[name = 'recpower']").prop("checked") == true) //获取checkbox值 { data. ...

  3. jquery操作select(option)的取值,设置和选中

    比如 <select class="selector"> <option value ="volvo">Volvo</option ...

  4. jQuery 设置select,radio的值,无法自动触发绑定的change事件

    一.问题 今天在对select和radio做change事件绑定后,手动设置其value值,但是不能触发change事件 二.解决 使用trigger方法手动触发

  5. 遍历input。select option 选中的值

    <label> <input name="Fruit" type="radio" value="0" class=&quo ...

  6. 让innerHTML获取的内容包含input和select(option)的最新值

    function refreshData(){ var allInputObject=document.body.getElementsByTagName("input"); fo ...

  7. servlet里获得jsp页面里select的选项之值

    <span style="font-size:24px;"><select name=first> <option value="1&quo ...

  8. 根据输出设置select的被选中值

    $("#startupStatus").find("option").map(function(i) { if ($('#st-status').val() = ...

  9. select初始化添加option,通过标签给出回显值,由于回显值和初始化值option中有一个值重复,去重等问题!

    第一张图片: 第二张图片 /** *该方法是为了去重,所谓去重就是 因为回显给select附上了值并设置为selected选中状态,而在我们初始化所有的select添加option元素中于回显的值重复 ...

随机推荐

  1. iPhone 通过UIRequiredDeviceCapabilities指定程序适用于哪些设备

    以前在itunes中查看某个应用时,会有说明信息,表明程序适用于ios 1.0,2.0,3.0什么的. 上周末将Key Manager上传到app store时,一直有个疑问,就是没有发现填写程序适用 ...

  2. js常用函数和常用技巧

    学习和工作的过程中总结的干货,包括常用函数.常用js技巧.常用正则表达式.git笔记等.为刚接触前端的童鞋们提供一个简单的查询的途径,也以此来缅怀我的前端学习之路. PS:此文档,我会持续更新. Aj ...

  3. ArcGIS Viewer for Flex中引入google map作底图 (转)

    在ArcGIS Viewer for Flex开发中,经常需要用到google map作为底图,我们不能通过ArcGIS Viewer for Flex - Application Builder轻易 ...

  4. ElasticSearch获取指定Field数据的Java方法

    ElasticSearch(ES)检索后需要结果时,可能通过source接口读出.但是这样的话,返回的结果会很多.在调用search方法时,我们可以添加addfield或addfields方法,仅仅读 ...

  5. Elasticsearch教程(一),全程直播(小白级别)

    ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.Elasticsearch是用Java开发的,并作为Apach ...

  6. [Tools] Support VS Code Navigation and Autocomplete Based on Webpack Aliases with jsconfig.json

    It's common to setup Webpack aliases to make imports much more convenient, but then you lose the abi ...

  7. Html5 Canvas之arc函数图示详解

    在不变换坐标系的情况下,arc函数画弧的方向如下图所示: 举例来说,arc(x,y,r,Math.PI/6,Math.PI/3,false);是以x,y为圆心,r为半径,从x正轴顺时针30度为起始角, ...

  8. JAVA Eclipse中的Android程序如何使用线程

    我们先单独定义一个java类,名字可以任意取(比如叫做ClientHeartBeat类,我当前在做一个socket通信的客户端,我们假定需要一个可以测试心跳的程序),注意他要继承Thread,然后重载 ...

  9. iOS开发 最近开发了蓝牙模块,在此记录总结一下(转载)

    1.基本概念 <1>中心者模式:常用的(其实99.99%)就是使用中心者模式作为开发,就是我们手机作为主机,连接蓝牙外设.由于开发只用到了中心者模式,所以我也只介绍中心者模式. <2 ...

  10. node - 关于package.json

    2018-8-3(首次更新) 一.关于版本号: 文章来自:https://blog.csdn.net/yancloudfrontend/article/details/72867314 指定版本:比如 ...