- 博客(26)
- 资源 (5)
- 收藏
- 关注
原创 (调试) tips
1 再修改bug的时候最好处于西塔波,就是非常放松,类似于睡眠的状态。2 利用outline来选择struts的action3 多添加system.out.println()语句4 如果能把程序的执行过程用自己的语句描述出来,让后写在txt文本当中,一点一点的修改啊。下面是一个例子 1 登陆完成以后userlogin.do,进入的页面时memberCenter.jsp, 在这个页
2012-08-19 20:34:37 350
原创 ajax tips
1 所有现代浏览器均支持 XMLHttpRequest 对象(IE5 和 IE6 使用 ActiveXObject)。2 创建 XMLHttpRequest 对象的语法: variable=new XMLHttpRequest(); 老版本的 Internet Explorer (IE5 和 IE6)使用 ActiveX 对象: variable=new ActiveXObjec
2012-08-18 17:24:17 472
原创 ajax 异步javascript
function showHint(str){var xmlhttp;if (str.length==0) { document.getElementById("txtHint").innerHTML=""; return; }if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, S
2012-08-18 17:21:52 333
原创 ajax 第一个ajax程序
function loadXMLDoc(){var xmlhttp;if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new Activ
2012-08-18 17:00:04 318
原创 jquery 广告轮播
图片轮播切换效果-橡树小屋#banner {position:relative; width:478px; height:286px; border:1px solid #666; overflow:hidden;}#banner_list img {border:0px;}#banner_bg {position:absolute; bottom:0;background-color:
2012-08-12 20:20:25 612
原创 jquery filter使用""和''效果是一样的
<%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>jQuery hover特效 $(document).ready(functio
2012-08-12 18:18:38 661
原创 jquery ok
1 新建一个java web工程 在css文件夹下面导入jquery.js我使用的版本是1.802 新建 一个jsp文件$(document).ready(function(){ $("p").click(function(){ $(this).hide(); });});If you click on me, I will disappear.
2012-08-10 22:11:17 331
原创 jquery offset
$(document).ready(function(){ $("button").click(function(){ x=$("p").offset(); $("#span1").text(x.left); $("#span2").text(x.top); });});本段落的偏移是 unknown left 和 unknown top。获得 offs
2012-08-10 19:08:12 425
原创 jquery addClass(添加一个css样式)
$(document).ready(function(){ $("button").click(function(){ $("p:first").addClass("intro"); });});.intro{font-size:120%;color:red;}This is a headingThis is a paragraph.This is a
2012-08-10 11:14:04 7369
原创 jquery toggle(绑定多个函数,顺序执行)
$(document).ready(function(){ $("button").toggle(function(){ $("body").css("background-color","green");}, function(){ $("body").css("background-color","red");}, function(){ $("bo
2012-08-10 10:49:49 5982
原创 jquery $(window).resize(function() { $('span').text(x+=1); });
x=0;$(document).ready(function(){$(window).resize(function() { $("span").text(x+=1);});});窗口大小被调整过 0 次。请试着重新调整浏览器窗口的大小。
2012-08-09 11:31:13 1485
原创 jquery fontsize:"+=6px"
$(document).ready(function(){ $("p").one("click",function(){ $(this).animate({fontSize:"+=6px"}); });});这是一个段落。这是另一个段落。请点击 p 元素增加其内容的文本大小。每个 p 元素只会触发一次改事件。
2012-08-09 11:25:24 563
原创 jquery keydown和keyup
$(document).ready(function(){ $("input").keydown(function(){ $("input").css("background-color","#FFFFCC"); }); $("input").keyup(function(){ $("input").css("background-color","#D6D6FF");
2012-08-09 10:54:24 405
原创 jquery preventDefault()将会阻止默认方法的执行
$(document).ready(function(){ $("a").click(function(event){ event.preventDefault(); });});W3SchoolpreventDefault() 方法将防止上面的链接打开 URL。
2012-08-01 21:17:48 984
原创 jquery 显示鼠标坐标
$(document).ready(function(){ $(document).mousemove(function(e){ $("span").text("X: " + e.pageX + ", Y: " + e.pageY); });});鼠标指针位于:
2012-08-01 21:09:27 554
原创 jquery error
$(document).ready(function(){ $("img").error(function(){ $("img").replaceWith("图片未加载!"); });});如果上面的图像没有正确地加载,会被替换为一段 "图片未加载" 的文本。
2012-08-01 18:05:16 288
原创 jquery live和die
$(document).ready(function(){ $("p").live("click",function(){ $(this).slideToggle(); }); $("button").click(function(){ $("p").die(); });});这是一个段落。这是另一个段落。请点击任意 p 元素,段落会消失。包括本段落。
2012-08-01 17:57:59 362
原创 jquery delegate() 方法为指定的元素(属于被选元素的子元素)添加一个或多个事件处理程序,并规定当这些事件发生时运行的函数
$(document).ready(function(){ $("div").delegate("button","click",function(){ $("p").slideToggle(); });});这是一个段落。请点击这里
2012-08-01 17:52:50 1952
原创 jquery blur 函数 当输入域失去焦点 (blur) 时改变其颜色
$(document).ready(function(){ $("input").focus(function(){ $("input").css("background-color","#FFFFCC"); }); $("input").blur(function(){ $("input").css("background-color","#D6D6FF"); }
2012-08-01 17:45:30 1060
原创 jquery 实现各行换颜色
$(document).ready(function(){ $("tr:even").css("background-color","#B2E0FF");}); Welcome to My Web PageIdLastNameFirstNameAddressCity1AdamsJohnOxford StreetLondon2
2012-08-01 17:24:43 761
原创 jquery append追加,preppend预置
$(document).ready(function(){ $("button").click(function(){ $("p").append(" W3School."); });});This is a headingThis is a paragraph.This is another paragraph.请点击这里
2012-08-01 17:08:37 1210
原创 jquery html改变div当中的内容
$(document).ready(function(){ $("button").click(function(){ $("p").html("W3School"); });});This is a headingThis is a paragraph.This is another paragraph.请点击这里
2012-08-01 17:04:58 66626 4
原创 jquery callback函数(当函数执行完成的时候执行callback函数)
$(document).ready(function(){ $("button").click(function(){ $("p").hide(1000,function(){ alert("The paragraph is now hidden"); }); });});HideThis is a paragraph with little content
2012-08-01 17:01:01 1693
原创 jquery animate实现动画效果
$(document).ready(function(){ $("#start").click(function(){ $("#box").animate({height:300},"slow"); $("#box").animate({width:300},"slow"); $("#box").animate({height:100},"slow"); $("#box").a
2012-08-01 16:42:32 588
原创 jquery fadeTo实现图像淡入效果
$(document).ready(function(){ $("button").click(function(){ $("div").fadeTo("slow",0.25); });});点击这里查看淡出效果
2012-08-01 16:39:36 735
原创 jquery slideToggle实现滑动
$(document).ready(function(){$(".flip").click(function(){ $(".panel").slideToggle("slow"); });}); div.panel,p.flip{margin:0px;padding:5px;text-align:center;background:#e5eecc;border
2012-08-01 16:31:00 1302
struts所用的jar文件
2012-02-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人