`
文章列表
由于jquery里默认ajax调用是异步的,所以在一些需要同步执行的场合就会出问题,如我有一个表单,我想在提交它之前对里面的一个文本框进行验证(要提交到服务器上连接数据库验证的),就会出现提交的时候还没等服务器返回验证结果,表单已经被提交了。 解决方法有 1.直接在$.ajax()中设置async: false        $.ajax({ type: "POST",            //http请求方式 url: "XMLServer",    //服务器段url地址 data: "username=" + userna ...

js相册

版本1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>图片滚动</title> <script type="text/javascript" src="../jquery-1.2.6.pack.js"></script ...
package com.mail; import java.util.Properties; import javax.mail.Message; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; public class JavamailTest { /** * @param args */ public s ...
<script src="jquery-1.2.6.pack.js" type="text/javascript"></script> <div id="aa" style="width:200px;height:300px;border:1px solid green;position:absolute;right:0px;bottom:0;display=none;"> <input type=button onclick="$('#aa' ...
<!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>随滚动条移动的层 - webjx.com</TITLE> <META HTTP-EQUIV=" ...
// 加载xml文档 loadXML = function(xmlFile){ var xmlDoc; if(window.ActiveXObject){ xmlDoc = new ActiveXObject('Microsoft.XMLDOM'); xmlDoc.async = false; xmlDoc.load(xmlFile); }else if (document.implementation&&document.implementation.createDocument){ xmlDoc = ...
import java.io.Serializable; import java.sql.SQLException; import java.util.List; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; import org.springframework.orm.hibernate3.HibernateCallback; import org.springframework.orm.hibernate3.s ...
package cc.cococ.trade.util; import java.util.regex.Matcher; import java.util.regex.Pattern; public class FormatValidate { // 保存每个月的天数 private static final int[] DAYS_OF_MONTH = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; // 日历的起始年份 public static final int STAR ...
http://www.iteye.com/news/21193       //精典推荐的十个网站   http://blog.sina.com.cn/s/articlelist_1136390600_0_2.html  //java demo http://www.verycd.com/topics/2787345/  struts2 http://www.verycd.com/topics/2777272/   jbpmhttp://www.verycd.com/topics/239368/   struts validate http://www.verycd.com/topi ...
package com.book.util; import org.apache.commons.lang.RandomStringUtils; /** * @see RandomPwd随机生成密码 * @version 1.0 * */ public class RandomPwd { public static String random() { String str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz";//初始化种 ...

调用exe File

    博客分类:
  • Jave
// dos public static void openWinExe() { Runtime rn = Runtime.getRuntime(); Process p = null; try { String command = "calc"; p = rn.exec(command); } catch (Exception e) { e.printStackTrace() ; } ...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- //计算位置的函数:元素,属性 function calculateOffset(field, attr) { var offset = 0; ...
<!-- dwr 配置 --> <servlet> <servlet-name>dwr-invoke</servlet-name> <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>true</param-value&g ...
// 环绕型 package com.aop; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.springframework.orm.hibernate3.HibernateTemplate; public class MethodInterceptionTest implements MethodInterceptor { private HibernateTemplate hiTem ...

spring aop_001

    博客分类:
  • J2EE
引用          //  事务 <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"></property> </bean> // 测试 <bean id="aoptest&quo ...
Global site tag (gtag.js) - Google Analytics