JQUERY共25篇
jqgrid实现单选功能-Ddmit

jqgrid实现单选功能

jqgrid默认没有提供单选功能,但是提供了多选功能(multiselect),因此可以通过隐藏多选按钮,每次选择的一条记录的时候重置一下选择列表的方式实现单选: 假设你的html部分代码如下: <table...
ddmit的头像-DdmitDdmit6年前
035660
jqgrid在ondblClickRow事件中获取行号-Ddmit

jqgrid在ondblClickRow事件中获取行号

在使用jqgrid的过程中,发现貌似没有直接得到行号的方法或者类似的参数(话说,到底是不是这样),在jqgrid提供的选项[更多参数参考这里]中有个参数rownumbers,它是个boolean型的参数,设置为t...
ddmit的头像-DdmitDdmit6年前
129470
jquery.load()方法加载页面失效-Ddmit

jquery.load()方法加载页面失效

背景说明: 我在一个main.jsp中想使用jquery.load方法让一个div区域载入一个页面list.html,结果发现访问main.jsp时,页面一直在请求,但是始终无法加载list.html页面,也就是jquery.load()方法...
ddmit的头像-DdmitDdmit5年前
026460
jquery 3.x报错TypeError: e.indexOf is not a function解决方法-Ddmit

jquery 3.x报错TypeError: e.indexOf is not a function解决方法

jquery 3.3.1版本报错TypeError: e.indexOf is not a function,这是因为$(window).load方法已经废弃。 产生错误的代码: $(window).load(function(){}); 修改为: $(window).on('load',functio...
ddmit的头像-DdmitDdmit6年前
025450
漂亮美观的图片上传插件jquery file upload-Ddmit

漂亮美观的图片上传插件jquery file upload

jQuery-File-Upload图片上传组件能够同时可以多个图片同时上传,预览,其官方源码及示例,请移步[jQuery-File-Upload],界面预览,请见下方: 参考文章: http://blueimp.github.io/jQuery-File-...
ddmit的头像-DdmitDdmit6年前
023700
jquery ajax用法-Ddmit

jquery ajax用法

说明: jquery ajax用于执行一个异步的HTTP(ajax)请求。 格式: $.ajax({ url:'querySrvTotalTopDuration.action', async:true, dataType:'json', data:{'startTime':startTime,'endTime':endTi...
ddmit的头像-DdmitDdmit5年前
022530
如何break/exit jquery.each()方法-Ddmit

如何break/exit jquery.each()方法

在使用jQuery的each()方法时,如何跳出循环呢?根据官方文档的说明,可以使用return false进行break,如下: We can break the $.each() loop at a particular iteration by making the callbac...
ddmit的头像-DdmitDdmit6年前
021380
使用jquery设置radio选中状态-Ddmit

使用jquery设置radio选中状态

页面初始化完成即选中初始化按钮? 例: 页面代码 <input type='radio' name='gender' value='Male'> <input type='radio' name='gender' value='Female'> JS代码 $(function() { v...
ddmit的头像-DdmitDdmit5年前
020210
jquery实现右下角弹窗并有提示音-Ddmit

jquery实现右下角弹窗并有提示音

本文介绍一种通过jquery实现右下角弹窗,并有提示音的实现方法,类似于腾讯QQ右下角的广告弹窗,实现过程很简单,具体的思路是: 1.定义一个默认隐藏的div; 2.通过js控制div缓慢加载出来,同事...
ddmit的头像-DdmitDdmit6年前
020060
JQuery节点操作-Ddmit

JQuery节点操作

目的: 熟悉jquery中添加或删除子节点及添加或删除兄弟节点等操作; 概要:了解jQuery中添加子节点(添加子元素)、删除子节点(删除子元素)、添加兄弟节点(添加同级 元素)、删除兄弟节点(...
ddmit的头像-DdmitDdmit6年前
020000