`
tianyalinfeng
  • 浏览: 442968 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论
文章列表
function HasChinese(str)  HasChinese=false  dim i  for i=1 to Len(str)  if Asc(Mid(str,i,1))<0 then  HasChinese=true  exit for  end if  next  end function   当页面编码设置了 <% Response.CodePage=65001%> <% Response.Charset="UTF-8" %> 时,Asc函数就失效了,所以上述判断方法此时应改为   func ...
<s:if test="%{#weahter.weather=='雨'}"> #weahter.weather的值确实是'雨',但上述值却为false 解决办法,加上toString() <s:if test="%{#weahter.weather=='雨'.toString()}">
/** * check mobile phone number *  * @param mobiles * @return */ public static boolean isMobileNO(String str) { Pattern p = Pattern .compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$"); Matcher m = p.matcher(str); return m.matches(); }   /** * check id number *  * @par ...

excel常用函数

CONCATENATE   连接字符串

asp获取ip

    博客分类:
  • ASP
Function GetIp() Dim DulIp,ProIP DulIp=Request.ServerVariables("HTTP_X_FORWARDED_FOR") ProIP=Request.ServerVariables("REMOTE_ADDR") If DulIp="" Then GetIp=ProIP Else GetIp=DulIp End If End Function
String.prototype.startWith=function(str){ if(str==null||str==""||this.length==0||str.length>this.length)   return false; if(this.substr(0,str.length)==str)   return true; else   return false; return true; }   String.prototype.endWith=function(str){ if(str==null||str=="& ...

中文转拼音

    博客分类:
  • Java
import net.sourceforge.pinyin4j.PinyinHelper; import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; impo ...

js string2date date2string

    博客分类:
  • Js
Date.prototype.toFomatorString = function(formator) { var returnText = formator.toUpperCase(); if (returnText.indexOf("YYYY") > -1) { returnText = returnText.replace("YYYY", this.getYear()); } if (returnText.indexOf("MM") > -1) { returnText = returnText.replace(&qu ...
<div myattr="test"></div> 使用$("div[myattr='test']")进行选择
private static String[] solarTerm = { "小寒", "大寒", "立春", "雨水", "惊蛰", "春分", "清明", "谷雨", "立夏", "小满", "芒种", "夏至", "小暑", "大暑", "立秋", "处暑", &quo ...

js版公历转农历

    博客分类:
  • Js
var lunarInfo=new Array( 0x4bd8,0x4ae0,0xa570,0x54d5,0xd260,0xd950,0x5554,0x56af,0x9ad0,0x55d2, 0x4ae0,0xa5b6,0xa4d0,0xd250,0xd255,0xb54f,0xd6a0,0xada2,0x95b0,0x4977, 0x497f,0xa4b0,0xb4b5,0x6a50,0x6d40,0xab54,0x2b6f,0x9570,0x52f2,0x4970, 0x6566,0xd4a0,0xea50,0x6a95,0x5adf,0x2b60,0x86e3,0x92ef,0 ...
var  solarTerm  =  new  Array("小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分" ...

公历农历互相转换

    博客分类:
  • Java
public class CalendarUtil { // Array lIntLunarDay is stored in the monthly day information in every year // from 1901 to 2100 of the lunar calendar, // The lunar calendar can only be 29 or 30 days every month, express with // 12(or 13) pieces of binary bit in one year, // it is 30 days for 1 fo ...

公历转阴历Lunar类

    博客分类:
  • Java
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date;   public class Lunar { private int year; private int month; private int day; private boolean leap; final static String chineseNumber[] = { "一", "二", &qu ...

向js传递参数

    博客分类:
  • Js
//传递参数 test.js?date=2013-04-19 //js里获取参数 var query_date = null; (function() { var scripts = document.scripts || document.getElementsByTagName("script"); var thisScript = scripts[scripts.length-1]; query_date = decodeURIComponent((thisScript.src.match(/[?&]date\=([^& ...
Global site tag (gtag.js) - Google Analytics