09 2012 档案

摘要:1.配置hibernate.cfg.xml<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><!-- Generated by MyEclipse Hib 阅读全文
posted @ 2012-09-29 14:43 小木v587 阅读(1781) 评论(0) 推荐(1)
摘要:SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date date; try { date = sdf.parse("2012-08-08"); System.out.println(sdf.format(date)); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } 阅读全文
posted @ 2012-09-24 10:56 小木v587 阅读(155) 评论(0) 推荐(0)
摘要:<input type="checkbox" name="linefo.travelType" value="1" > 当季特惠 <input type="checkbox" name="linefo.travelType" value="2"> 尊贵纯玩 <input type="checkbox" name="linefo.travelType" value="3"> 自由行 阅读全文
posted @ 2012-09-22 10:18 小木v587 阅读(285) 评论(0) 推荐(0)
摘要:按钮式:<INPUT name="pclog" type="button" value="GO" onClick="location.href='http://www.ddhbb.com/'">链接式:<a href="javascript:history.go(-1)">返回上一步</a><a href="<%=Request.ServerVariables("HTTP_REFERER")%>& 阅读全文
posted @ 2012-09-20 15:42 小木v587 阅读(444) 评论(1) 推荐(0)
摘要:框架页面下跳转到登录页面,会遇到登录页面仍然在框架中第一种:在login.jsp的body中加入下面这句<script type="text/javascript">if (top.location !== self.location) {top.location=self.location;}</script>这个js就能解决问题了!第二种:点击退出时调用这个logOut()方法 function logout(){ if( confirm("你确实要退出吗?")){ window.parent.location.href=&q 阅读全文
posted @ 2012-09-14 14:28 小木v587 阅读(377) 评论(0) 推荐(0)
摘要:<script>var picPath;var image;// preview picturefunction preview(){document.getElementById('preview').style.display = 'none';// 下面代码用来获得图片尺寸,这样才能在IE下正常显示图片document.getElementById('box').innerHTML= "<img width='"+image.width+"' height='" 阅读全文
posted @ 2012-09-13 10:32 小木v587 阅读(268) 评论(0) 推荐(0)
摘要:最近做上传图片,结果中图片不能显示,试过几种转码方式,结果都不能成功。 最后找到种方法,和大家分享一下 在tomcat 中 conf/server.xml将<Connector port="8088" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" 阅读全文
posted @ 2012-09-12 15:55 小木v587 阅读(218) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GB2312" /> <title>textarea字数限制 练习代码多有参考网络 by ahuinan</title> 阅读全文
posted @ 2012-09-10 22:50 小木v587 阅读(260) 评论(0) 推荐(0)
摘要:获取select被选中项的文本,select下拉框的第二个元素为当前选中值,radio单选组的第二个元素为当前选中值,获取值:文本框,文本区域:$("#txt").attr("value");多选框checkbox:$("#checkbox_id").attr("value");单选组radio: $("input[@type=radio][@checked]").val();下拉框select: $('#sel').val(); …… jquery radio取值,checkb 阅读全文
posted @ 2012-09-06 11:04 小木v587 阅读(199) 评论(0) 推荐(0)
摘要:因为我数据库中的一个字段是DateTime类型,用EL表达式输出到界面的时候是 1985-12-16 00:00:00.0 。EL表达式:${userBirthday}问题是:我想让它输出的是 1985-12-16 .用EL表达式怎么写?1.<%@tablib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>上面的 uri 根据你的实际情况定。${fn:substring("你要截取的字符串"),beginIndex,endIndex}2.可以采用 JS 阅读全文
posted @ 2012-09-04 21:13 小木v587 阅读(6108) 评论(1) 推荐(0)
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <body> <input type=file name="doc" id="doc" onchange="javascript: 阅读全文
posted @ 2012-09-03 11:58 小木v587 阅读(340) 评论(0) 推荐(0)
摘要:1.这一个是读取textarea的maxlength属性的值,进行计算,思路很好,但修改起来就麻烦啊,不过对于js爱好者来说是个不错的参考,通过读取属性值进行控制。<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; chars 阅读全文
posted @ 2012-09-03 09:26 小木v587 阅读(272) 评论(0) 推荐(0)