jquery Select2 学习笔记之中文提示 - CSDN博客
首先学习这个东西呢,还是看官网比较全面
要select2中文显示:必须要引入中文包,且一定要放在select2.js之后
- <link type="text/css" rel="stylesheet" href="/css/select2.css">
- <script type="text/javascript" src="/js/select2.full.min.js"></script>
- <script type="text/javascript" src="/js/i18n/zh-CN.js"></script></span>
- $(".selectProduct").select2({
- ajax:
- {
- url: "getProducts",
- dataType: 'json',
- type: 'POST',
- delay: 250,
- data: function (params)
- {
- var param = new Object();
- param.name = params.term;
- return param;
- },
- processResults: function (resp, page)
- {
- var array = new Array();
- if (resp.products)
- {
- for (var i = 0; i < resp.products.length; i++)
- {
- var product = resp.products[i];
- array.push({id:product.productId, text: product.productName});
- }
- }
- var ret = new Object();
- ret.results = array;
- return ret;
- },
- cache: true
- },
- minimumInputLength: 2,
- language: "zh-CN",
- }); </span>
jquery Select2 学习笔记之中文提示 - CSDN博客的更多相关文章
- ibatis 学习笔记 3 - pfpfpfpfpf的专栏 - 博客频道 - CSDN.NET
body { font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI ...
- Spring Boot学习记录(二)--thymeleaf模板 - CSDN博客
==他的博客应该不错,没有细看 Spring Boot学习记录(二)--thymeleaf模板 - CSDN博客 http://blog.csdn.net/u012706811/article/det ...
- OpenGL ES 学习笔记 - Overview - 小旋的博客
移动端图形标准中,目前 OpenGL ES 仍然是比较通用的标准(Vulkan 则是新一代),这里新开一个系列用于记录学习 OpenGL ES 的历程,以便查阅理解. OverView OpenGL ...
- Python入门学习笔记4:他人的博客及他人的学习思路
看其他人的学习笔记,可以保证自己不走弯路.并且一举两得,即学知识又学方法! 廖雪峰:https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958 ...
- jQuery源代码学习笔记_工具函数_noop/error/now/trim
jQuery源代码学习笔记_工具函数_noop/error/now/trim jquery提供了一系列的工具函数,用于支持其运行,今天主要分析noop/error/now/trim这4个函数: 1.n ...
- 我的 CSDN 博客目录索引(主要记录了我学习视频、书籍的笔记,持续更新中)
我的 CSDN 博客地址: lw_power的专栏 - 博客频道 - CSDN.NEThttp://blog.csdn.net/lw_power 佟刚老师<Spring4视频教程>学习笔记 ...
- 使用Javascript/jQuery将javascript对象转换为json格式数据 - 海涛的CSDN博客 - 博客频道 - CSDN.NET
body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI& ...
- 判断jQuery选择器结果为空 - CSDN博客
原文:判断jQuery选择器结果为空 - CSDN博客 jQuery选择器获取到的是一个对象,所以无论页面上存在或者不存在元素,这个对象都不为空.因此,如果要使用jQuery检查元素再给某个页面上是否 ...
- Python爬取CSDN博客文章
0 url :http://blog.csdn.net/youyou1543724847/article/details/52818339Redis一点基础的东西目录 1.基础底层数据结构 2.win ...
随机推荐
- vue + element-ui实现简洁的导入导出功能
1.安装ElementUI模块 cnpm install element-ui -S 2.在main.js中引入 import ElementUI from 'element-ui' import ' ...
- Windows的进程间通信
对于任何一个现代的操作系统,进程间通信都是其系统结构的一个重要组成部分.而说到Windows的进程(线程)间通信,那就要看是在什么意义上说了.因为正如"Windows的跨进程操作" ...
- BigNum模板
#include<iostream> #include<cstring> #include<iomanip> #include<algorithm> u ...
- Neo4j与springdata集成
1.maven工程需导入的jar包 <!-- neo4j --> <dependency> <groupId>org.springframework.data< ...
- mysql表时间戳字段设置
创建时间 修改时间
- HBase 表和Region
- Ionic 图片预览ion-slide-box,ion-slide,ion-scroll实现
1.index.html 代码 <body ng-app="starter"> <ion-pane> <ion-header-bar class=&q ...
- [转]模块化——Common规范及Node模块实现(二)
模块的循环加载 如果发生模块的循环加载,即A加载B,B又加载A,则B将加载A的不完整版本. // a.js exports.x = 'a1'; console.log('a.js ', require ...
- c语言学习笔记 函数数组传递笔记
今天学习c语言的一个小例子,果然还是陷入了php的编程习惯里,这里记录一下. #include <stdio.h> //例子很简单,就是编写一个函数把传递进来的数组里的值都赋值为1而已 / ...
- LUOGU P3111 [USACO14DEC]牛慢跑Cow Jog_Sliver
传送门 解题思路 比较简单的一道思路题,首先假设他们没有前面牛的限制,算出每只牛最远能跑多远.然后按照初位置从大到小扫一遍,如果末位置大于等于前面的牛,那么就说明这两头牛连一块了. 代码 #inclu ...