• 首页
  • 关于
  • 9Enjoy.com
  • 日志 RSS

代码收藏

收集网站开发时常用到的代码(asp,php,js等),以函数为主

  • asp
  • javascript
  • mssql
  • php

截取's tag archives

截取字符串-InterceptString

'************* 截取字符串 **************function InterceptString(txt,length) txt=trim(txt) x = len(txt) y = 0 if x >= 1 then for ii = 1 to x if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then '如果是汉字 y = y + 2 else y = y + 1 end if if y >= length then txt = left(trim(txt),ii) '字符串限长 exit for end if next InterceptString = txt else InterceptString = "" end ifEnd...
READ THE FULL ARTICLE >>

随便看看

  • php验证码
  • JS读取写入Cookies操作
  • 判断是否为指定长度内字符串
  • 用PHP生成随机数(另附PHP随机函数)
  • SureRemoveDir-删除目录

标签

中文 分页 删除 压缩 参数 图像 图表 柱状图 大写 字符串 存储过程 截取 截取 itlearner 数组 水印 目录 缩略图 解密 货币 邮件 采集 长度 随机 验证码 addslashes array convert cookie email enjoy focus format float GBK gd bmp html ip IP QQWry ispage 数字 分页 js js 消息 JSON mssql passport php类 proxy utf8

代码归档

  • 2011年一月
  • 2010年五月
  • 2010年四月
  • 2010年三月
  • 2010年二月
  • 2010年一月
  • 2009年四月
  • 2009年三月
  • 2009年二月
  • 2009年一月
  • 2008年十一月
  • 2008年九月

友情链接

  • IP地址查询
  • 114桌面壁纸
  • IT学习者
  • 技术文档
  • apache2.2官方文档
  • JavaScript语言参考手册
  • php完全手册

功能

  • 登录
  • Valid XHTML
  • Valid CSS
  • WordPress
Copyright © 2010 代码收藏. Techified theme by Cell Phones. Modified By Enjoy 10 queries, 0.235 seconds.