平民王子
平民王子 · 共 187 篇文章
使用jQuery技术进行用户名校验
使用jQuery技术进行用户名校验 主要是在js代码中处理(做两件事): Button按下的时候要将文本框的数据获取到,并使用Ajax发送到服务器端判断,最后将服务器端返回来的数据填充到div中 文本框上,需要判断用户在文本框上输入的数据是不是为空,要是不为空,CSS的作用就得要取消 先看客户端jsp代码: <html> <head> <base href="<%=basePath%>"> <title>使用jQuery技术进行用户名校验</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache…
2010-11-25 20:15 · jQuery · 评论(0) · CSS · Ajax · jQuery · JavaScript · Servlet
jQuery中Ajax相关方法
Ajax相关方法,两个工具方法(serialize(),serializeArray()) <body> <form id="test"> 用户名: <input id="user" name="user" type="text" /> <br /> 个人介绍: <textarea id="desc" name="desc"></textarea> <br /> 喜欢的图书: <select id="book" name="book"> <option value="java"> Java </option> <option value="javaee"> Java EE </option>…
2010-11-24 22:36 · jQuery · 评论(0) · Ajax · JavaEE · jQuery · JSP · JavaScript
jQuery动画效果相关方法
动画效果相关的方法 <html> <head> <base href="<%=basePath%>"> <title> 动画效果相关的方法</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv…
2010-11-24 22:31 · jQuery · 评论(0) · Cache · CSS · jQuery · Swing · JavaScript
jQuery事件相关方法
jQuery事件相关方法 <body> <input id="test1" type="button" value="单击我" /> <br /> <input id="test2" type="button" value="切换右边复选框的勾选状态" /> <input id="check" type="checkbox" value="" /> <input id="check2" type="checkbox" value="" /> <br /> <input id="test3" type="button" value="绑定toggle的按钮" /> <br /> <div id…
2010-11-24 22:29 · jQuery · 评论(0) · CSS · Ajax · jQuery · JavaScript
jQuery支持的方法
字符串,数组和对象相关的工具方法 <html> <head> <base href="<%=basePath%>"> <title>字符串,数组和对象相关的工具方法</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <me…
2010-11-24 22:27 · jQuery · 评论(0) · CSS · Ajax · jQuery · 出版 · JavaScript
jQuery操作类数组的工具方法
jQuery对象提供了几个常用的方法来操作类数组: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>操作类数组的工具方法</title> <meta http-equiv="Content-Type" content="text/html; charset=GBK" /> <scrip…
2010-11-24 16:54 · jQuery · 评论(0) · Java · Ajax · jQuery · Hibernate · JavaScript
jQuery入门与介绍,jQuery对象
jQuery是一个非常优秀的JavaScript库。 使用jQuery动态更新HTML页面只需要两个步骤: 获取jQuery对象,jQuery对象通常是对DOM对象的包装 调用jQuery对象的方法来改变自身 学习jQuery只要掌握两点,一就是获取jQuery对象,二就是怎样灵活使用jQuery对象的方法。 让jQuery与其他JavaScript库共存: 如Prototype,要使他们两共存,就要解决$()函数的使用,解决办法就是取消jQuery中的$()函数,使用其他的代替 ,请看下面的代码 <html> <head> <base href="<%=basePath%>"> <titl…
2010-11-24 16:47 · jQuery · 评论(0) · CSS · Ajax · jQuery · Hibernate · JavaScript
Prototype的Ajax支持使用Ajax.PeriodicalUpdater类
简单的说:它就是一个周期性的Ajax.Updater。 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHT…
2010-11-21 00:01 · Prototype · 评论(0) · HTML · Ajax · prototype · JavaScript · XHTML
Prototype的Ajax支持使用Ajax.Updater类
这个类是对Ajax.Request类的简化,使用该类不需要使用回调方法,该类自动讲服务器响应显示到某个容器。 下面就是一个简单的例子: <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %…
2010-11-20 23:59 · Prototype · 评论(0) · Ajax · prototype · JavaScript · Apple · Servlet
Prototype的Ajax支持使用Ajax.Responders对象
这个对象用于注册Ajax时间监听器,该对象注册的Ajax时间监听器不管是那个XMLHttpRequest在发生交互,都能被自动触发。而且,Ajax.Responders注册的时间监听器是全局有效的,主要方法是register(函数名)。 一个简单的例子: <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.get…
2010-11-20 23:55 · Prototype · 评论(0) · Ajax · prototype · JavaScript · Apple · Servlet
Prototype的Ajax支持使用Form.request方法
Form.request()方法实际上是Ajax.Request的封装,该方法会将所有的表单控件转换为请求参数,默认的向该表单的action指定的URL发送异步请求。 一个简单的用法例子: <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getS…
2010-11-20 23:50 · Prototype · 评论(0) · Ajax · prototype · JavaScript · XHTML · Servlet
Prototype的Ajax支持使用Ajax.Request类
我们只要简单的创建一个Ajax.Request对象,就可以完成异步请求的放送 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %> <!DOCTYPE html PUBLIC "-//W…
2010-11-20 23:45 · Prototype · 评论(0) · Ajax · prototype · JavaScript · Apple · Servlet
Prototype扩展Array,document,String,Function,Number
Array的扩展 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>扩展Array</title> <meta name="author" content="Yeeku.H.Lee" /> <meta name="website" content="http://www.crazyit.…
2010-11-20 22:54 · Prototype · 评论(0) · Struts · prototype · Hibernate · JavaScript · XHTML
Prototype中两个常用的监听器
Form.Observer(form,interval,callbank),表示表单form中任何一个表单控件的值发生了改变,interval秒之后就自动触发callback函数 Form.Element.Observer(element,interval,callbank),表示表单控件element的值发生了改变,interval秒之后就自动触发callback函数 Form.Observer例子: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD…
2010-11-20 22:49 · Prototype · 评论(0) · HTML · prototype · JavaScript · XHTML
Prototype中使用Class
Class是Prototype库中为弥补JavaScript不支持面向对象而提供的对象 C <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>使用Template</title> <meta name="author" content="Yeeku.H.Lee" /> <meta nam…
2010-11-20 22:43 · Prototype · 评论(0) · HTML · C · prototype · JavaScript · XHTML