用ASP生成ZT条型码

失恋人各

失恋人各

2016-02-19 18:17

下面图老师小编要跟大家分享用ASP生成ZT条型码,简单的过程中其实暗藏玄机,还是要细心学习,喜欢还请记得收藏哦!

  html
  head
  meta http-equiv="Content-Type" content="text/html; charset=gb2312"
  META NAME="Author" CONTENT="haiwa"
  titleAsp生成条形码/title
  /head
  body
  %

(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/webkaifa/)

  function haiwaocde(zfstr)
  zf = zfstr
  zf = replace(zf,"0","_|_|__||_||_|")
  zf = replace(zf,"1","_||_|__|_|_||")
  zf = replace(zf,"2","_|_||__|_|_||")
  zf = replace(zf,"3","_||_||__|_|_|")
  zf = replace(zf,"4","_|_|__||_|_||")
  zf = replace(zf,"5","_||_|__||_|_|")
  zf = replace(zf,"7","_|_|__|_||_||")
  zf = replace(zf,"6","_|_||__||_|_|")
  zf = replace(zf,"8","_||_|__|_||_|")
  zf = replace(zf,"9","_|_||__|_||_|")
  zf = replace(zf,"a","_||_|_|__|_||")
  zf = replace(zf,"b","_|_||_|__|_||")
  zf = replace(zf,"c","_||_||_|__|_|")
  zf = replace(zf,"d","_|_|_||__|_||")
  zf = replace(zf,"e","_||_|_||__|_|")
  zf = replace(zf,"f","_|_||_||__|_|")
  zf = replace(zf,"g","_|_|_|__||_||")
  zf = replace(zf,"h","_||_|_|__||_|")
  zf = replace(zf,"i","_|_||_|__||_|")
  zf = replace(zf,"j","_|_|_||__||_|")
  zf = replace(zf,"k","_||_|_|_|__||")
  zf = replace(zf,"l","_|_||_|_|__||")
  zf = replace(zf,"m","_||_||_|_|__|")
  zf = replace(zf,"n","_|_|_||_|__||")
  zf = replace(zf,"o","_||_|_||_|__|")
  zf = replace(zf,"p","_|_||_||_|__|")
  zf = replace(zf,"r","_||_|_|_||__|")
  zf = replace(zf,"q","_|_|_|_||__||")
  zf = replace(zf,"s","_|_||_|_||__|")
  zf = replace(zf,"t","_|_|_||_||__|")
  zf = replace(zf,"u","_||__|_|_|_||")
  zf = replace(zf,"v","_|__||_|_|_||")
  zf = replace(zf,"w","_||__||_|_|_|")
  zf = replace(zf,"x","_|__|_||_|_||")
  zf = replace(zf,"y","_||__|_||_|_|")
  zf = replace(zf,"z","_|__||_||_|_|")
  zf = replace(zf,"-","_|__|_|_||_||")
  zf = replace(zf,"*","_|__|_||_||_|")
  zf = replace(zf,"/","_|__|__|_|__|")
  zf = replace(zf,"%","_|_|__|__|__|")
  zf = replace(zf,"+","_|__|_|__|__|")
  zf = replace(zf,".","_||__|_|_||_|")

  haiwaocde = zf
  end function
  code_H = 52
  code_W = 2
  function dragcode(ccode)
  c = ccode
  c = replace(c,"_","span style='height:"&code_H&";width:"&code_w&";background:#FFFFFF'/span")
  c = replace(c,"|","span style='height:"&code_H&";width:"&code_w&";background:#000000'/span")
  dragcode = c
  end function

(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/webkaifa/)

  Function CheckExp(patrn,str)
  Set regEx=New RegExp
  regEx.Pattern=patrn
  regEx.IgnoreCase=true
  regEx.Global=True
  CheckExp = regEx.test(str)
  End Function

  code = request("c")

  if code = "" then
  code = "*51windows.net*"
  else
  if Checkexp("^[abcdefghijklmnopqrstuvwxyz1234567890+-*/%$.]*$",code) then
  code = "*"&code&"*"
  else
  code = "*51windows.net*"
  errstr = "brcenter style='color:red;'含有非法字符 /center"
  end if
  end if
  ocode = code
  code = lcase(code)
  %
  centerform name="form1" method="post"合法字符:ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 + - * / % $ .brbrinput name="c" type="text" value="%=request("c")%" size="25" maxlength="15" input type="submit" name="Submit" value="提交"/formcenter
  div align="center"
  center
  table border="0" cellpadding="0" cellspacing="0" height="79"
  tr
  td height="61" align="center"%=dragcode(haiwaocde(code))%/td
  /tr
  tr
  td height="18" align="center" style="text-align:justify;text-justify:Distribute-all-lines;"%=(ocode)%/td
  /tr
  /table
  /center
  /div
  %=errstr%
  /body
  /html

展开更多 50%)
分享

猜你喜欢

用ASP生成ZT条型码

Web开发
用ASP生成ZT条型码

用asp生成wml

ASP
用asp生成wml

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

用ASP生成Chart

ASP
用ASP生成Chart

ASP生成XBM图可用作验证码

ASP
ASP生成XBM图可用作验证码

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

jsp 生成验证码代码

Web开发
jsp 生成验证码代码

用ASP随机生成文件名的函数

ASP
用ASP随机生成文件名的函数

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

Excel daverage函数如何使用?

Excel daverage函数如何使用?

一个简单的用存储过程分页

一个简单的用存储过程分页
下拉加载更多内容 ↓