今天使用bootstrap中的tagsinput控件,碰到个小问题
我直接使用时,后台一直报Uncaught Can't add objects when itemValue option is not set错误,
代码如下:
<div>
<input id="uploadFiles" placeholder="请选择..." data-role="tagsinput" />
</div>
$("#uploadFiles").tagsinput({
itemValue: 'id',
itemText: 'text',
});
var test={id:'adfa',text:'fff'};
$("#uploadFiles").tagsinput('add', test);
查了半天,没找到问题所在,后来在stackoverflow发现一个相同的错误的帖子:
http://stackoverflow.com/questions/31926025/bootstrap-tagsinput-cant-add-objects-when-itemvalue-option-is-not-set
给了我启发,原来是写了data-role="tagsinput"属性,去掉后就OK啦
今天使用bootstrap中的tagsinput控件,碰到个小问题的更多相关文章
- Bootstrap中datetimepicker日期控件1899年问题解决
Bootstrap中datetimepicker日期控件1899年问题解决 最近在开发项目的过程中,遇到一个很尴尬的问题.我们项目一直采用的是angular+bootstrap,日期控件用的是boot ...
- bootstrap中使用日历控件
在bootstrap中使用日历控件可以参照以下资料: http://www.bootcss.com/p/bootstrap-datetimepicker/index.htm 以下是参照此资料自己做的一 ...
- 一个Bootstrap风格的分页控件
http://www.cnblogs.com/wangwei123/p/3682626.html 主题 jQueryBootstrap 一个Bootstrap风格的分页控件,对于喜欢Bootstr ...
- Bootstrap的表单控件
支持的表单控件 Bootstrap 支持最常见的表单控件,主要是 input.textarea.checkbox.radio 和 select. 输入框(Input) 最常见的表单文本字段是输入框 i ...
- 在DevExpress程序中使用SplashScreenManager控件实现启动闪屏和等待信息窗口
在我很早的WInform随笔<WinForm界面开发之"SplashScreen控件">有介绍如何使用闪屏的处理操作,不过那种是普通WInform和DevExpress ...
- 在WPF中使用WinForm控件方法
1. 首先添加对如下两个dll文件的引用:WindowsFormsIntegration.dll,System.Windows.Forms.dll. 2. 在要使用WinForm控 ...
- wpf telerik中的book控件
下载 telerik中的书本控件,仅供学习使用.
- [原创]在Framelayout中放置button控件出现的覆盖问题
android Framelayout(帧布局)是很常用的布局,主要用来处理需要多个view叠加显示的情况. 然而在使用中,我发现Framelayout中的Button控件,会挡住所有其他控件,而不论 ...
- (转)客户端触发Asp.net中服务端控件事件
第一章. Asp.net中服务端控件事件是如何触发的 Asp.net 中在客户端触发服务端事件分为两种情况: 一. WebControls中的Button 和HtmlControls中的Type为su ...
随机推荐
- Java单例模式实现(线程安全)
package com.javaee.corejava; /** * 线程安全的单例模式 * @author miaoyf * */ public class Singleton { /** * 私有 ...
- Use Visual studio 2010 build Python2.7.10
http://p-nand-q.com/python/building-python-27-with-vs2010.html
- Eclipse IDE for Java EE Developers 与 Eclipse Classic(Eclipse Standard)区别
Eclipse下载官网:http://www.eclipse.org/downloads/ 版本: 1.Eclipse classic(Eclipse Standard):Eclipse的标准版; 2 ...
- Git——1
集中式版本控制系统,版本库是集中存放在中央服务器的,而干活的时候,用的都是自己的电脑,所以要先从中央服务器取得最新的版本,然后开始干活,干完活了,再把自己的活推送给中央服务器.中央服务器就好比是一个图 ...
- (String). Word Pattern
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full mat ...
- 2、NASA HS3(Hurricane AND Server Storm Sentinel)
国内访问不到,但是通过ppt可以看到,数据支撑做的很到位,前台展示很炫. 气象领域WebGL应用最好案例的当之无愧啊.这篇全部贴图了. 来自为知笔记(Wiz)
- ZOJ 3481. Expand Tab
题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4278 题意: 给出一些文本片段,把文本中的 Tab 字符根据配置,替换成 ...
- dubbo+zookeeper集群配置
集群服务注册到多台zookeeper配置: <dubbo:registry protocol="zookeeper" address="10.20.153.10:2 ...
- Chrome插件概览(一) – The basics
转载http://lvjava.com/?p=582 原文见https://developer.chrome.com/extensions/overview.html Chrome Extension ...
- 【练习】oracel获取当前session的id方法
1. :: SYS; SID ---------- 2. :: SYS@ORA11GR2>SELECT USERENV('SID') FROM DUAL; USERENV('SID') ---- ...