用js动态添加select标签的option
来源:互联网 发布:java计算器实现 编辑:程序博客网 时间:2024/06/07 01:57
js代码:
var featureLayerURLTest=[["http://192.168.15.174:6080/arcgis/rest/services/Sample/GQYDGH/FeatureServer/0","线图层1"]];function createSelectOption(featureLayerURLTest){ var _html=""; for(var _i=0;_i<featureLayerURLTest.length;_i++){ _html=_html+"<option value='"+featureLayerURLTest[_i][0]+"'>"+featureLayerURLTest[_i][1]+"</option>"; } $("#featureLayerOptions").append(_html); var html=$("#featureLayerOptions"); //console.log(html);}$(function(){ createSelectOption(featureLayerURLTest);});
html代码:
<div> <lable>选择操作图层:</lable> <br/> <select id="featureLayerOptions"> <option id="defaultOption" value="0"> 请选择操作图层 </option> </select></div>
阅读全文
0 0
- 用js动态添加select标签的option
- 用JS动态添加select的option
- JS&JQuery动态添加select option标签
- 动态添加select的option
- JS & JQuery 动态添加 select option
- js中select动态添加option
- JS & JQuery 动态添加 select option
- JS & JQuery 动态添加 select option
- JS & JQuery 动态添加 select option
- JS & JQuery 动态添加 select option
- 运用js实现select动态添加option和select联动
- JQuery动态添加Select的Option元素
- JQuery动态添加Select的Option元素
- 动态添加select的option (转)
- ajax异步获取数据,动态添加select标签中的option
- JS select option 元素的大批量添加
- js 自动添加select option的值
- JS动态创建Select的option
- 142. Linked List Cycle II
- hdu2955 Robberies(01背包)题解
- JAVA基础
- win7下安装ps出现错误码16解决办法
- 防火墙中配置FTP
- 用js动态添加select标签的option
- Day06 heartbeat
- Shell Script ----变量
- 统计学与R笔记—第一章Chapter1
- 使用rnn实现的OCR开源项目
- 20170726 JAVA基本概念
- 利用ant脚本 自动构建svn增量/全量 系统程序升级包
- FFMPEG添加文字中文显示乱码的问题
- spring整合redis集群配置