ITeye博客

JQuery

共 15 篇文章

web页面打印

Web页面打印: [code="html"] function printsetup(){ // 打印页面设置 页面需引入 <OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height=0 id=wb name=wb width=3></OBJECT> wb.execwb(8,1); } function printpreview(){ // 打印页面预览 wb.execwb(7,1); } function printit(div) { if (confirm("确定打印吗?")) { document.getEle…

2012-04-26 14:25 · JQuery · WEB

JQuery--点击返回页面顶部

function goTop() { $('html, body').animate({scrollTop:0}, 'slow'); }

2012-04-12 14:07 · JQuery

jQuery 参考

50个jQuery代码段帮你成为更好的JavaScript开发者 http://www.woiweb.net/50-jquery-snippets-for-developers.html 30个JQuery动画效果合集 http://www.woiweb.net/30-jquery-animation-collection.html JQuery多选插件 http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ jQuery UI Tools http://flowplayer.org/tools/ jQuer…

2011-08-18 14:48 · JQuery

使用Jquery做的滚动新闻

滚动新闻代码从是网上找的,自己做了一些修改,特别是新闻比较长时. <ul class="scrollBox"> <li> <a href="#" title="${news.title }">abc</a> </li> <li> <a href="#" title="${news.title }">abc很常的新闻标题</a> </li> <li> <a href="#" title="${news.title }">abc<div>${news.title }</div></a> </li> </ul> <style type="text/css"> .scrollBox { BACKGR…

2010-06-03 11:24 · JQuery · CSS · jQuery · JavaScript

使用CSS处理文本溢出时显示省略号

在多数情况下要显示文本信息多时就需要显示省略号,CSS里有这个处理,使用方便: 语法: text-overflow : clip | ellipsis 取值: clip : 默认值 。不显示省略标记(...),而是简单的裁切 ellipsis : 当对象内文本溢出时显示省略标记(...) 说明: 设置或检索是否使用一个省略标记(...)标示对象内文本的溢出。 这个属性仅仅作用于水平内联方向的,普通的西方文本的溢出。内联溢出发生在行内的文本超出可用宽度却没有换行机会的时候。 要强制溢出发生并且应用 ellipsis 值,作者必须设置对象的 white-space 属性值为 nowrap 。 假…

2010-06-03 11:17 · JQuery · CSS · 脚本

ajax upload file

AJAX Uplad File 是个简单而美观的上传文件插件。 附件是从官方网站下的例子! 详细使用步骤如下: 1. 下载ajaxupload.js文件。 官方:http://valums.com/ajax-upload/ 2. 在JSP中添加JS和CSS代码(如果你想自己定义样式) <script type="text/javascript" src="<%=request.getContextPath() %>/js/ajaxupload.js"></script> <style type="text/css"> .wrapper { width: 133px; margin: 0 au…

2010-06-03 09:18 · JQuery · CSS · Ajax · Spring · EXT · Bean

jquery plugin autocomplete

http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

2010-04-28 17:50 · JQuery · jQuery

jquery取得iframe元素的方法

收集利用Jquery取得iframe中元素的几种方法 : $(document.getElementById('iframeId').contentWindow.document.body).htm() 显示iframe中body元素的内容。 $("#testId", document.frames("iframename").document).html(); 根据iframename取得其中ID为"testId"元素 $(window.frames["iframeName"].document).find("#testId").html() 作用同上 收集网上的一些示例: 用jQuery…

2009-12-19 22:42 · JQuery · HTML · jQuery · 框架

jQuery.typeof and jQuery.isEmpty Utilities

One of the best aspects of jQuery is its light weight. I have really taken advantage of some of its built in Utilities such as jQuery.extend() and jQuery.map(). I am definitely against bloated software, but I find myself writing these functions time and again. They are pretty utilitarian and not to…

2009-05-15 15:15 · JQuery · jQuery · JavaScript

ajax请求时的缓存的问题

ajax请求同一个url地址时,如果发现url地址没有变而缓存里有就会直接去取值,不会再去请求服务器。这种情况会在不同的机器不同的IE上各有不同,解决的方式是在ajax请求的地址里加上一个随机的参数例如(jQuery): $.getJSON(path+"/library/structuresView.do?num=1&structCount="+customColumnNum*rowNum+"&datetime="+(new Date()).getTime(), "", function(json){alert(json)}) $.ajax({url: path+"/library/stru…

2009-05-05 17:35 · JQuery · Ajax · json · jQuery · IE

checkbox disable时取值方法

在使用checkbox时,我们有时间不想让用户勾选,但又需要显示它并且取到它的value,一般可能会如下使用: <input type="checkbox" value="test" checked="checked" disabled="disabled"/> 这样会发现总是取不到value.. 有一个简单的方法可以做到: <input type="checkbox" value="test" checked="checked" onclick="alert("no way"); return false;"/>

2009-04-23 10:01 · JQuery

jQuery Form Plugin

Form Plugin API http://malsup.com/jquery/form/#getting-started The Form Plugin API provides several methods that allow you to easily manage form data and form submission. ajaxForm Prepares a form to be submitted via AJAX by adding all of the necessary event listeners. It does not submit the form. U…

2009-04-22 14:29 · JQuery · Ajax · PHP · json · XML · jQuery

利用Jmesa处理List<Map>方法

<本篇文章是与从同事的博客上拿来学习,代码做一点我的.呵....> Jmesa中处理Map的List对象 目前需求, 客户上传excel文件, 有列名, 列名不固定, 想预览数据, 使用Jmesa做table, 有两种实现方法. 第一种使用动态类, 封装map对象. 第二种是一种巧妙的方法. 下面先介绍第一种方法: 使用动态类: [code="java"] package com.founder.cst.action; import Java.util.ArrayList; import Java.util.List; import javax.servlet.http.HttpServle…

2009-04-11 16:03 · JQuery · Apache · Spring · Python · Bean · Excel

Jquery的表单插件

1. 本篇文章是从我网上搜集整理的有关Jquery Form的用法。 Jquery Form Plugin是jquery最重要的插件之一,它利用AJAX技术在不引起页面刷新的情况下POST表单。主要有两个方法:ajaxform和ajaxsubmit。它会自动收集表单元素内容,决定如何管理提交进程。这两个方法支持多重选择。我想AJAX方式的表单应用再没有比这个插件更简单易用的了。 先在页面里设置一个普通的表单: <form id=”myForm” action=”comment.php” method=”post”> 姓名: <input type=”text” name=”name” id=…

2009-04-03 13:30 · JQuery · 应用服务器 · Ajax · json · jQuery · JavaScript

jQuery中对异步提交JSON和XML数据的处理方式

最近在项目中用到Jquery,感觉真的不错,开源的插件也比较多。 项目中,我随手记录一些常用的方法。也是刚刚学习,有问题大家一起讨论, 希望能留下宝贵意见! 首先,在JQuery中AJAX请求一般有 $.post(url,data,callback) $.get(url,data,callback) $.ajax (options)... 以post为例JSON数据处理方式: [img]/upload/attachment/87362/7483e332-1e89-3d85-b388-315874f25327.jpg[/img] 1. html code: [code="html"] expo…

2009-03-23 23:22 · JQuery · Ajax · json · 数据结构 · XML · jQuery