`
vencent888
  • 浏览: 139506 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
//返回网页参数 形如 somepage.html?para=1, ?后面的参数。若没有参数返回空数组,空数组等价于"" function pageSearchParas(){ var paras=new Array(); var url= window.location.search; if (url.indexOf("?")!=-1){ var strs=url.substr(1).split("&"); for(i=0; i<strs.length; i++){ paras.push(new Ar ...
1:按enter提交方法--------------------   <body onload="puckerList();showtop();"onkeydown="return formSubmit();"> function formSubmit(){ if(window.event.keyCode==13) { searchNews(); } } String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, "") ...

生成验证吗码

    博客分类:
  • jsp
验证码区域: <div><div class="ContentLeft2"><span class="word_gray424242"><bean:message key="web.contractus.vericode"/></span> <span class="word_red">*</span></div> <div class="ContentRight2"> <input ...
/** Removes all spaces from a string */     public static String removeSpaces(String str) {         StringBuffer newString = new StringBuffer();         for (int i = 0; i < str.length(); i++) {             if (str.charAt(i) != ' ')                 newString.append(str.charAt(i));         }         ...
  /**      * Creates a Map from an encoded name/value pair string      * @param str The string to decode and format      * @param trim Trim whitespace off fields      * @return a Map of name/value pairs      */     public static Map strToMap(String str, boolean trim) {         if (str == null) return ...
public static final String module = StringUtil.class.getName();     /**      * Replaces all occurances of oldString in mainString with newString      * @param mainString The original string      * @param oldString The string to replace      * @param newString The string to insert in place of the old ...
//判断某一个IP是否为内网IP public static boolean isInnerIP(String ipAddress) { boolean isInnerIp = false; long ipNum = getIpNum(ipAddress); /** * 私有IP:A类 10.0.0.0-10.255.255.255 B类 172.16.0.0-172.31.255.255 C类 * 192.168.0.0-192.168.255.255 当然,还有127这个网段是环回地址 */ long aBegin = getIpNum("10. ...
public static String getUTF(String str) { if (str.equals("") || str.length() < 1) return ""; int length = str.length(); if (length % 2 != 0) return ""; String strArray[] = new String[length / 2]; for (int i = 0; i < length / 2; i++) { strArray[i] ...
/** *@param   2005-11-03 09:23:00.0 *@return  2005-11-03 * @throws ParseException * */ public static Date getFormatDateNoTime(Date date) { String tempStr = Util.dateToString(date, Constants.DATETIMEFORMAT); String tempDate = tempStr.substring(0, 10); Date tempDateReturn = null; tempD ...

java常用方法2

    博客分类:
  • java
public static void setSessionAttributes( String[] keys, Object[] values, HttpSession session) { for (int i = 0; i < keys.length; i++) { session.setAttribute(keys[i], values[i]); } } public static void clearSessionAttributes( String[] keys, HttpSession session) { for (int i = 0 ...

java常用方法1

    博客分类:
  • java
public static String dateToString(Date date, String formatString) { SimpleDateFormat format = new SimpleDateFormat(formatString); return format.format(date); } public static Date stringToDate(String dateString, String formatString) { try { SimpleDateFormat format = new SimpleDateFormat(for ...
#different project with defferent value project.name=tcps_web module.code=web #project structure, don't change #sql.version should be the same with the one in ModuInfo.initData() sql.version=1.0 src = JavaSource properties.name=${module.code}.properties destfile.name=dos-${module.code}_v1.mip java.de ...

ant1

    博客分类:
  • ant
<!-- Copyright (c) 2002 by ObjectLearn. All Rights Reserved. --> <project name="${project.name}" default="ssh" basedir="."> <property file="build.properties" /> <echo message="${apppath}/${src}/${properties.name}" /> <loa ...

编码过滤器

<filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-pa ...

过滤器1

<filter> <filter-name>SessionFilter</filter-name> <filter-class>              com.huawei.it.tcps.filter.SessionFilter </filter-class> </filter>    <filter-mapping> <filter-name>SessionFilter</filter-name> <url-pattern>/system/ ...
Global site tag (gtag.js) - Google Analytics