ITeye博客

2010 年文章归档

共 20 篇文章

常用的jQuery插件或JS角本(主要以丰富前台展现效果)

fckeditor 不用多说 facebox Jquery插件弹出层,用起来很方便,效果也很不错,而且可以自己修改CSS来修改样式,最主要的,上手容易,角本文件很小 jquery.validate 我感觉很好用的表单验证的Jquery插件,我在也不用因为表单验证写好多好多无聊的JS了 jQuery UI.Layout 网页布局的jquery插件

2010-12-22 16:25 · javascript

FCK虚拟目录

我用FCK时还出现了一个问题,就是不希望把上传的图片放在工程下面,这样对应用环境下可以进行代码更新时,很不方便,不过FCK也提供了接口,只要实现就好了。 第一步:实现ContextPathBuilder接口 import javax.servlet.http.HttpServletRequest; import net.fckeditor.handlers.PropertiesLoader; import net.fckeditor.requestcycle.impl.ContextPathBuilder; import com.clubgold.btg.sft.bean.Merchant;…

2010-12-18 11:50 · 综合

FCK多用户

FCK(默认)一直以来,用户都可以共享所上传的图片,多多少少都会有点问题,而且在很多情况下也不能满足需求,但其实FCK也想到了这点,他自己本生就提供了接口,可以每个用户指定文件夹,让用户上传的图片,不用进行共享 第一步:实现接口ContextPathBuilder import javax.servlet.http.HttpServletRequest; import net.fckeditor.handlers.PropertiesLoader; import net.fckeditor.requestcycle.UserPathBuilder; import com.clubgold.b…

2010-12-18 11:19 · 综合

oracle11 客户端安装及PLSQL和TOAD中文乱码

参考转载于: http://fish119.iteye.com/blog/680851 1.从Oracle官方下载“Instant Client Package”的软件,较好的实现了Oracle客户端绿化的解决方案。 下载地址为:http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html 可下载的程序包有: 下载程序包: instantclient-basic-win32-11.1.0.x.0.zip (目前有版本: 11.1.0.6.0 和 11.1.0.7.0) 或 instan…

2010-11-17 12:51 · oracle

使用facebox弹出层

<html> <head> <link href="${cssPath}/facebox.css" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript" src="${jsPath}/jquery-1.3.2.js"></script> <script language="javascript" type="text/javascript" src="${jsPath}/facebox.js"></script> <script language="javascript…

2010-10-20 11:41 · javascript

使用uploadify进行上传

<html> <bead> <link href="${cssPath}/uploadify.css" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript" src="${jsPath}/jquery-1.3.2.js"></script> <script type="text/javascript" src="${jsPath}/uploadify/swfobject.js"></script> <script type="text/javascript" src="…

2010-10-20 11:20 · javascript

文本值改变后的事件捕获(text、textarea)

转发参考: http://hi.baidu.com/yljf184/blog/item/98df82df71fc731f62279876.html •onpropertychange,只要当前对象属性发生改变,都会触发事件,因此用途更为广泛,只可惜它是IE only; •oninput是onpropertychange的非IE浏览器版本,支持firefox和opera等浏览器,但有一点不同,它绑定于对象时,并非该对象所有属性改变都能触发事件,据我所知,它只在对象value值发生改变时奏效。 <textarea name="smsMessage.message" onpropertychang…

2010-10-15 18:25 · 综合

java定时器Timer和TimerTask

public class SMSTimer extends TimerTask { @Override public void run() { // 在这里写定时运行的代码(线程体) } } SMSTimer smsTimer = new SMSTimer(); Timer timer = new Timer(true); timer.schedule(smsTimer, new Date(), 60000); Timer timer = new Timer(true); 这里回了个参数,主要是标明线程为守护线程,守护线程的优先级别是最低的(比如java垃圾回收器),用于为系统中的其它对象和…

2010-10-14 10:35 · java

BASE64 编码和解码

本文参考转发于: http://www.zhuoda.org/elite/34479.html public static String base64DecoderTool(final String str) throws SystemException{ BASE64Decoder decoder = new BASE64Decoder(); String returnStr = null; byte[] b; try { b = decoder.decodeBuffer(str); returnStr = new String(b , "gbk"); } catch (Exception…

2010-10-13 09:23 · java

SAX解析XML

public class XMLParse { // 定义一个Properties 用来存放标签值 private Properties props; public Properties getProps() { return this.props; } public void parse(String filename) throws Exception { // 将解析器对象化 try { ConfigParser handler = new ConfigParser(); // 获取SAX工厂对象 SAXParserFactory factory = SAXParserFactory.…

2010-10-13 09:09 · java

在线帮助文档地址

JavaTM 2 Platform Standard Ed. 6 地址 http://jdk.accptech.com/ http://www.xasxt.com/java/api/ jQuery 1.3 API 地址 http://jquery-api-zh-cn.googlecode.com/svn/trunk/index.html

2010-10-11 14:12 · 综合

struts1.2中从一个action跳转到另外一个action

转至: http://www.cnblogs.com/mabaishui/archive/2010/09/15/1827052.html 在action的方法的最后,一般情况下都使用return mapping.findForward("xxxxx"); 如果想跳转到另外一个action的某个页面,可以这样: ActionForward actionForward = new ActionForward(); actionForward.setPath("/customer/creditApprManage.do?method=searchCreditLevel&levelName="); …

2010-10-11 14:07 · java

读文件时的中文问题的解决

public String getFilterString(final String filePath) { FileInputStream fis = null; BufferedReader br = null; StringBuffer smsFilter = new StringBuffer(); // 定义一个String类型的变量,用来每次读取一行 InputStreamReader isr = null; try { if (filePath == null || filePath.length() == 0){ fis = new FileInputStream(DEF_SM…

2010-10-11 14:05 · java

只可输入数字的文本框

参考: http://www.cnblogs.com/ljhong/archive/2008/09/22/1296127.html <input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">

2010-10-11 14:00 · javascript

javascript字符串处理

转至 http://blog.minidx.com/2008/01/07/355.html 函数:split() 功能:使用一个指定的分隔符把一个字符串分割存储到数组 例子: str=”jpg|bmp|gif|ico|png”; arr=theString.split(”|”); //arr是一个包含字符值”jpg”、”bmp”、”gif”、”ico”和”png”的数组 函数:John() 功能:使用您选择的分隔符将一个数组合并为一个字符串 例子: var delimitedString=myArray.join(delimiter); var myList=new Array(”jpg”,…

2010-10-11 13:57 · javascript

IP地址解析

废话不说,直接上代码 Utils.java /* * Created on 2004-8-4 * */ import java.io.UnsupportedEncodingException; /** * @author LJ-silver */ public class Utils { /** * 从ip的字符串形式得到字节数组形式 * @param ip 字符串形式的ip * @return 字节数组形式的ip */ public static byte[] getIpByteArrayFromString(String ip) { byte[] ret = new byte[4]; j…

2010-08-04 09:54 · java

不清不楚的Error listenerStart

错误信息很简单, 严重:Error listenerStart 然后在后面跟上些乱七八糟的东西,看到我不知所云,想了好多方法,在网上了查了好多的资料,可惜还是没有成功,求助于好友,他给我发来一个文章,这才让我度过了这太过于寒冷的冬天 地址: http://hi.baidu.com/chinese_j2ee/blog/item/2bbacc47b7da4d016a63e525.html 这样,我才知道是哪里的问题 1、在tomcat安装目录的common/classes中建立一个属性文件log4j.properties 2、在文件中写入日志的信息及日志记录的等级: log4j.rootLogg…

2010-08-04 09:39 · 稀奇古怪的bug

javascript多重继承小例子(zInherit工具)

function ClassX(){ this.messageX = "This is the X message. "; if(typeof ClassX._initialized == "undefined"){ ClassX.prototype.sayMessageX = function(){ alert(this.messageX); }; ClassX._initialized = true; } } function ClassY(){ this.messageY = "This is the Y message. "; if(typeof ClassY._initialize…

2010-04-15 15:29 · javascript

javascript继承小例子(动态原型方法)

function Polygon(iSides){ this.sides = iSides; if(typeof Polygon._initialized == "undefined") { Polygon.prototype.getArea = function(){ return 0; }; Polygon._initialized = true; } } function Triangle(iBase , iHeight){ Polygon.call(this , 3); this.base = iBase; this.height = iHeight; // Triangle._in…

2010-04-15 04:38 · javascript

javascript继承小例子(原型链与对象冒充)

function ClassA(sColor){ this.color = sColor; } ClassA.prototype.sayColor = function(){ alert(this.color); }; function ClassB(sColor , sName){ // 使用call继承ClassA构造中定义的属性和方法(对象冒充) ClassA.call(this , sColor); this.name = sName; } // 这种方式将继承ClassA中prototype中的属性和方法(原型链) ClassB.prototype = new ClassA(); …

2010-04-13 02:11 · javascript