ITeye博客

jquery

共 35 篇文章

ueditor编辑器图片上传路径问题

第一部:修改jsp/config.json文件 访问前缀:#basePath# pathFormat:uploads前面添加“/”斜杠 /* 前后端通信相关的配置,注释只允许使用多行方式 */ { /* 上传图片配置项 */ "imageActionName": "uploadimage", /* 执行上传图片的action名称 */ "imageFieldName": "upfile", /* 提交的图片表单名称 */ "imageMaxSize": 2048000, /* 上传大小限制,单位B */ "imageAllowFiles": [".png", ".jpg", ".jpeg",…

2015-04-02 13:24 · jquery · js

Javascript 类与静态类的实现2

/***定义静态类***/ var StaticClass = (function(){ var Return = { Property: "Test Static Property", //公有属性 Method: function(){ //公有方法 alert(_Field); //调用私用字段 privateMethod(); //调用私用方法 } }; //定义返回的公有对象 var _Field = "Test Static Field"; //私有字段 var privateMethod = function(){ //私有方法 alert(Return.Property); …

2014-08-19 16:47 · jquery · js

Javascript 类与静态类的实现1

首先说说类,在一个类里我们会有以下的几个特征: 1. 公有方法 2. 私有方法 3. 属性 4. 私有变量 5. 析构函数 我们直接看一个例子: /***定义类***/ var Class = function(){ var _self = this;//把本身引用负值到一变量上 var _Field = "Test Field"; //私有字段 var privateMethod = function(){ //私有方法 alert(_self.Property); //调用属性 } this.Property = "Test Property"; //公有属性 this.Method =…

2014-08-19 16:45 · jquery · js

JS实现类拟JAVA中MAP对像的功能

/* name: Map.js author: WindDC date: 2006-10-27 content: 本程序用JS实现类拟JAVA中MAP对像的功能 */ function Node(key,value){//键值对对象 this.key=key; this.value=value; } function Map(){//Map类 this.nodes=new Array(); } Map.prototype.put=function(key,value){//往容器中加入一个键值对 for(var i=0;i<this.nodes.length;i++) if(this.nod…

2014-08-19 16:34 · jquery · js

jQuery 多功能无缝滚动插件

/*** @description 基于 jQuery 的多功能无缝滚动插件 @params auto: true # 是否自动滚动 interval: 3000 # 间隔时间(毫秒) direction: 'forward' # 向前 - forward / 向后 - backward speed: 500 # 移动速度(毫秒) showNum: 1 # 显示个数 stepLen: 1 # 每次滚动步长 type: 'horizontal' # 水平滚动 - horizontal / 垂直滚动 - vertical prevElement: null # 上一组按钮元素 prevBefor…

2014-08-05 13:00 · jquery · js

解决:在点击用户退出登录时,再按浏览器的后退按钮,仍然能够看到之前的页面

需要在服务器返回的response header里面设置Cache-control为"no-cache, no-store",而不是在页面中添加META response.setHeader("Cache-Control","no-cache,no-store"); response.setHeader("Pragma","no-cache"); response.setDateHeader ("Expires", -1); ================================================================================ 转:h…

2014-05-14 23:18 · jquery · java

复选框中 单选框 下拉

复选框 $("#id").is(":checked") 复选框选中 $("[name = field010]:checkbox").attr("checked", '${lcdy.field010}'); radio选中 $("input[name=test][value=34]").attr("checked",true);//value=34的radio被选中 $("input[id=testid][value=34]").attr("checked",true);//value=34的radio被选中 $('input:radio[name="field007"]').attr("ch…

2013-12-22 15:35 · jquery · js

Jquery append()总结(一)

append(content) Javascript代码 /** * 向每个匹配的元素内部追加内容。 * 这个操作与对指定的元素执行 appendChild 方法,将它们添加到文档中的情况类似。 * * @content(String, Element, jQuery) 要追加到目标中的内容 * @return Object * @owner jQuery Object */ function append(content); // 例子:向所有段落中追加一些HTML标记。 <p>I would like to say: </p> $("p").append("<b>Hello</b>") …

2013-10-25 18:33 · jquery

common-validator 验证框架使用

地址: http://www.marsclan.org/html/product/component/javascript/common-validator/index.html 能动态添加、删除验证。。。。 common-validator-2.2解决与jquery冲突问题。。。 至于把【common-validator-2.1.min.js】替换【common-validator-2.2.min.js】即可!!!!!!!!!!!!! Alter单个提示: common-validator-config 修改: /** * <pre> * @fileoverview * Copyright…

2013-10-12 12:47 · jquery

PhoneGap与android交互及 JQuery Mobile+ iscroll 列表滚动条的实现

1、PhoneGap与android交互 2、JQuery Mobile+ iscroll 列表滚动条的实现 以下是demo下载直接运行.

2013-08-13 18:32 · jquery · Android

iScroll 4 使用详解

原文: http://cubiq.org/iscroll-4 iScroll终于迎来了一个彻底的重写。现在的效果比以往更平滑并且增加了一些新的特性:缩放、下拉式刷新、元素捕捉以及更多更高级别可编程性的自定义事件。 项目信息 最后一次代码更新:2012.07.14 – v4.2 设备兼容:iPhone/Ipod touch >=3.1.1, iPad >=3.2, Android >=1.6, Desktop Webkit, Firefox, Opera desktop/mobile. 概述 iScroll 4是对于 原始iScroll代码 的一个彻底的重写,该脚本之所以开发是因为手机webk…

2013-08-13 17:24 · jquery

js 工具

1、js日期格式化: 使用方式:new Date(v).format('yyyy-MM-dd hh:mm'); Date.prototype.format = function(format) { var o = { "M+": this.getMonth() + 1, //month "d+": this.getDate(), //day "h+": this.getHours(), //hour "m+": this.getMinutes(), //minute "s+": this.getSeconds(), //second "q+": Math.floor((this.getMon…

2013-04-17 15:26 · jquery · js

JS- 清空file(兼容IE,火狐)

<script> function cleanFile(id){ var _file = document.getElementById(id); if(_file.files){ _file.value = ""; }else{ if (typeof _file != "object"){ return null; } var _span = document.createElement("span"); _span.id = "__tt__"; _file.parentNode.insertBefore(_span,_file); var tf = document.createElem…

2013-04-08 16:47 · jquery

【锋利的JQuery】 学习笔记

据说是一本不错的JQuery书,看完后感觉总体也不错,介绍的挺全面的,列举了大量的例子,比较易懂。 加上之前学过一点CSS方面的知识,所以在看选择器这部分也比较容易理解(很多都是CSS的写法)。 总体感觉,JQuery大置分成了几大块:选择器、DOM操作、事件、动画、AJAX。 本书都一一的介绍了,特别是选择器,几乎每种选择器都列举了一个例子,很容易看懂。 此文为读本书的过程中,记录的一些笔记,例子不是书里面的,只是觉得自己比较容易理解,就随便写了个。 如果有出错的地方,麻烦指正。 ^_^ [javascript] view plain copy // 锋利的JQuery 学习笔记 // d…

2012-04-12 17:56 · jquery

jQuery加分动画效果示例

.

2012-02-09 11:29 · jquery

web头像上传 裁剪 剪切功能

1、首先安装ImageMagick-6.3.7-Q16 2、上传路径修改:1、avtar.js 65行 upload 2、crop.jsp 26行 3、crop.jsp 78行 4、savefile.jsp 55行 3、服务器端图片处理:crop.jsp 36行 String cmd = "C:\\Tools\\ImageMagick-6.3.7-Q16\\convert "; 4、图片裁剪大小修改:crop.jsp 43行 cmd += " -quality 100 -crop 120x120!"; 5、改变预览头像大小:my.css 35行 #preDiv 6、改变中间方块大小:my.c…

2011-11-11 16:33 · jquery

lhgdialog 弹出窗体插件

http://lhgcore.com/

2011-11-03 16:21 · jquery

jquery 五星评分插件

.

2011-11-03 15:32 · jquery

jQuery formValidator表单验证插件

http://www.cnblogs.com/wzmaodong 演示地址: http://www.yhuan.com/formValidator4.1.1/demo8.html 下载链接: http://www.yhuan.com/formValidator4.1.1/formvalidator4.1.1.rar 升级记录: http://www.yhuan.com/formValidator4.1.1/doc/update.html 在线帮助文档: http://www.yhuan.com/formValidator4.1.1/doc/index.html 帮助文档下载: http://…

2011-11-03 15:28 · jquery

artDialog 强大弹出窗体插件

官网: http://www.planeart.cn/demo/artDialog/index.html 下载地址: http://code.google.com/p/artdialog/downloads/list

2011-11-03 10:53 · jquery