JQUERY 选择器
1 JQUERY使用前准备
使用jQuery需要引用jquery-X.X.X.min.js文件
<% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <script type="text/javascript" src="<%=basePath%>/js/jquery-1.4.2.min.js"></script>
2 JQUERY $ 的使用
选择页面的某一个固定元素
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@taglib prefix="dt" uri="/dttag"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <head> <script type="text/javascript" src="<%=basePath%>/js/jquery-1.4.2.min.js"></script> <script type="text/javascript"> function cleanUp(){ $("[name=emptyOperateVo.startDate]").attr("value"," "); }; </script> </head> <body onload="cleanUp()"> <form action="XXXX.action"> <td> <input type="hidden" name="emptyOperateVo.startDate" readonly="true" value="fortest"/> </td> </form>
=================Resources ========================================
http://jqueryui.com/demos/datepicker/