摘要: php Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1public function cutStr($string, $start ,$sublen, $extstring='', $code = 'UTF-8') 2 { ... 阅读全文
posted @ 2009-01-04 21:36 狼问苍穹 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 今天项目中用到,去掉字符串中的最后一个字符 原字符串1,2,3,4,5,6, 去掉最后一个字符",",最终结果为1,2,3,4,5,6 代码如下: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1$str = "1,2,3,4,5,6,"; 2$ne... 阅读全文
posted @ 2009-01-04 12:04 狼问苍穹 阅读(1691) 评论(0) 推荐(1) 编辑
摘要: //校验是否全由数字组成 [code] function isDigit(s) { var patrn=/^[0-9]{1,20}$/; if (!patrn.exec(s)) return false return true } [/code] //校验登录名:只能输入5-20个以字母开头、可带数字、“_”、“.”的字串 [code] function isRegiste... 阅读全文
posted @ 2009-01-04 11:26 狼问苍穹 阅读(296) 评论(0) 推荐(0) 编辑