- 博客(21)
- 收藏
- 关注
原创 在线支付
一 得到请求参数(即金额、商户号、签名、returnURL、adviceUrl)commonPayConfig =payMentService.getPaymentHuichao(); //参数得到configVo =payMentService.getHuichaoparameter(getSession(),charge,commonPayConfig);
2014-12-01 14:52:06
803
原创 css截取截取字符串
div{width:160px;word-break:keep-all;overflow:hidden;text-overflow:ellipsis;} 轻轻松松制作div+css截取字符段在规定长度,超出部分用。。asdfwhite-space:nowrap;asdfasdf。代替!
2014-12-01 14:45:56
412
原创 点击按钮 复制文本
$(function(){ $("#d_clip_button").click(function(){ var Url=$("#yao_txt").text(); copyToClipboard(Url); });});function copyToClipboard(){ var maintext = document.getElementByI
2014-12-01 14:42:41
517
原创 javamail示例
package test;import java.text.SimpleDateFormat;import java.util.Date;import java.util.Properties; import javax.mail.Address; import javax.mail.Message; import javax.mail.Session; imp
2014-12-01 14:33:32
224
原创 kindeditor-4.1.10 文件上传需修改
page language="java"contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> page import="java.util.*,java.io.*"%> page import="java.text.SimpleDateFormat"%> page import="org.apache
2014-12-01 14:29:10
3673
原创 hibernate二级缓存
第一步spring-hibernate.xml文件增加属性 propertyname="hibernateProperties"> props> propkey="hibernate.cache.use_second_level_cache">trueprop> prop key=
2014-12-01 14:26:32
265
原创 jquery.validate验证使用说明
一导入js库 二、默认校验规则(1)required:true 必输字段(2)remote:"check.php" 使用ajax方法调用check.php验证输入值(3)email:true 必须输入正确格式的电子邮件(4)url:true
2014-12-01 14:20:39
450
原创 弹出层示例
JavaScript 仿LightBox内容显示效果var isIE = (document.all) ? true : false;var isIE6 = isIE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6);var $ = function (id) {
2014-12-01 14:18:22
280
转载 头部固定
完美position:fixed 兼容各种浏览器 解决长页面fixed无法向下滚动发布日期:2012-10-31 前段时间做某个项目时,要求滚动条滚动时网页背景滚动,而网站内容保持不动,于是只有使用position:fixed,但有两个问题:一、IE6不支持position:fixed;二、使用position:fixed后,如果页面内容高度超过一个屏幕,无法向下滚动。本文就是来探讨这两
2014-08-07 14:59:20
364
转载 webService调用的几种方法
使用 Client 调用.Net开发的service Client client = new Client(new URL(url)); Object[] results= new Object[] {}; results= client.invoke("CreateOrder", new Obje
2014-08-07 14:43:29
701
转载 webService请求超时
try { URL url = newURL(sb.toString()); httpconn =(HttpURLConnection) url.openConnection(); httpconn.setConnectTimeout(1);
2014-08-07 14:40:50
381
转载 servlet依赖注入
//得到sqlserNewDao WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); Object o = wac.getBean("hibernateTemplate");
2014-08-07 14:40:15
367
转载 javascript判断文件大小 与type=‘file' 样式改变
//判断文件大小 var isIE = /msie/i.test(navigator.userAgent) &&!window.opera; function fileChange(target,id) { var fileSize = 0;
2014-08-07 14:38:46
478
转载 下载网络文件 与 java得到本地目录文件对象
下载网络文件//http://images.17173.com/2014/news/2014/08/02/cj0802hjx10s.jpgString path = "http://images.17173.com/2014/news/2014/08/02/cj0802hjx01s.jpg"; try { URL url = new URL(path);
2014-08-07 14:35:01
341
转载 静态代理与动态代理
静态代理: 比如要在输出“HelloWorld”前打印一个字符串“Welcome” A:先定义一个接口类 java 代码 package ttitfly.proxy; public interface HelloWorld { public void print(); // public void say(); } B: 定
2014-08-07 14:33:43
317
转载 使用反射 访问类实例的所有属性与属性值
/* * 利用反射访问类的所有变量 */ LProjectInformation lpf = findLPFById(id); Class c = lpf.getClass(); Field[] f = c.getDeclaredFields(); StringBuffer sb = new Strin
2014-08-07 14:32:49
252
转载 java调用存储过程
public String callToubiaoPro(GuarantyOrder guarantyOrder,InsuranceUsers user,List guarantyCustomerList)throws SQLException{ Session session = hibernateTemplate.getSessionFactory().getCurre
2014-08-07 14:30:26
306
转载 使用DbUtils访问数据库
/** * 删除无主键表数据 GongChengKehuxinxi1 * @param id */ publicstaticvoid deleteGongChengKehuxinxi1(Integer id) { Connection conn = null; String url = "jdbc:sqlse
2014-08-07 14:26:50
265
转载 使用注解的方式使用事物管理
使用步骤:步骤一、在spring配置文件中引入命名空间 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schem
2014-08-07 14:24:48
315
转载 springMVC 文件上传
文件上传 1 加入jar包commons-fileupload2 在 form 表单中 加入属性 enctype=”multipart/form-data” 在 springMVC 配置文件中加入 4 得到路径可在方法中加入MultipartHttpServletRequest request1参数 然后 Listfiles = reques
2014-08-07 14:21:13
255
原创 Spring MVC 3.X解决一个web项目关联多个数据源(数据库)
value="jdbc:sqlserver://localhost:1433;databaseName=CSSTOA">
2014-08-07 14:07:25
1247
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人