-
UID:2
-
- 注册时间2005-01-04
- 最后登录2024-07-30
- 在线时间128小时
-
- 发帖600
- 搜Ta的帖子
- 精华47
- PB3246
- 威望526
- 贡献值187
- 交易币124
- 好评度279
-
访问TA的空间加好友用道具
|
一个用asp生成条形码的例子代码。(注意:生成的图形为html代码,而非图片,打印时,请在IE的Internet选项=>高级=》打印 选定“打印背景颜色和图像”) 演示地址: http://www.51windows.net/myfile/asp/codeflag.asp更简单的方法就是使用条形码字体,下载: http://www.51windows.net/2004/share/font/tiaoma.rar(如果地址无法下载,请在Google上搜索"条形码 字体")。 - <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <meta name="Keywords" content="51windows.Net">
- <META NAME="Author" CONTENT="haiwa">
- <title>Asp生成系形码</title>
- <style>
- <!--
- * {font:menu}
- -->
- </style>
- </head>
- <body>
- <%
- '条形码生成程序
- '海娃@2004-4-4
- '[url]http://www.51windows.Net[/url]
- 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
- function dragtext(ccode)
- c = ccode
- dragtext = ""
- for i=1 to len(c)
- dragtext = dragtext&"<span style='width:26;text-align:center'>"&mid(c,i,1)&"</span>"
- next
- dragtext = dragtext
- end function
- 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 = "" the</span>
- </td>
- </tr>
- <tr>
- <td>
- <div><span class="unnamed3"><table bgcolor=#FFFFFF><form action=/html/4/7418.htm method=post name=REG><tr><td><br><input type=hidden name=act value=Reg><input type="hidden" name="regid" value="d9228969e843e0d8e5e47867ef310181"><fieldset class="Text2"><legend><b>验证码确认</b></legend><table cellspacing=0><tr><td width=1%>确认验证码<div class=Text2>请输入图片上的 6 位数字.</div><input type=text size=25 maxlength=32 name=reg_code></td><td align=center><img src="[url]http://www.zahui.com/show_image.php?rc=d9228969e843e0d8e5e47867ef310181[/url]"></td></tr></table></td></tr><tr><td><input type=submit value="提交验证查看全部文章"></td></tr></form></table></span></div>
- </td>
- </tr>
- </table>
- <table width="100%" border="0" cellpadding="9" cellspacing="0" align="center" bgcolor="#FFFFFF">
- <tr>
- <td><span class="unnamed2"><table><tr><td><fieldset class="Text2"><legend><b>相关文章</b></legend><a href= [url]http://www.zahui.com/html/4/7408.htm>ASP[/url]实现的无限级会员树型结构</a><br><a href= [url]http://www.zahui.com/html/4/7409.htm>[/url]网站图片扫描类</a><br><a href= [url]http://www.zahui.com/html/4/7410.htm>UBB[/url]代码~(整理)</a><br><a href= [url]http://www.zahui.com/html/4/7411.htm>[/url]用XMLHTTP做一个自己特色的Google</a><br><a href= [url]http://www.zahui.com/html/4/7412.htm>[/url][VBS]转换二进制数据为字符串常用办法</a><br><a href= [url]http://www.zahui.com/html/4/7413.htm>XMLHTTP[/url]下载远程数据输出到浏览器</a><br><a href= [url]http://www.zahui.com/html/4/7414.htm>[/url]防范SQL注入式攻击~</a><br><a href= [url]http://www.zahui.com/html/4/7415.htm>ASP[/url]组件介绍—w3Sockets</a><br><a href= [url]http://www.zahui.com/html/4/7416.htm>[/url]把asp程序封装成可执行文件(无需IIS web服务器)直接运行的管理系统</a><br><a href= [url]http://www.zahui.com/html/4/7417.htm>[/url]无组件的数据库的备份与还原</a><br><a href= [url]http://www.zahui.com/html/4/7419.htm>windows200s.iis.asp[/url]网页中修改access记录时无效</a><br><a href= [url]http://www.zahui.com/html/4/7420.htm>[/url]用asp实现的代码批量修改程序,fso相关</a><br><a href= [url]http://www.zahui.com/html/4/7421.htm>[/url]如何在ASP中连接MySQL 数据库</a><br><a href= [url]http://www.zahui.com/html/4/7422.htm>[/url]将ACCESS转化成SQL2000需要注意的几个问题</a><br><a href= [url]http://www.zahui.com/html/4/7423.htm>ASP[/url]通用数据库显示编辑程序</a><br><a href= [url]http://www.zahui.com/html/4/7424.htm>[/url]用Asp备份与恢复SQL Server 数据库</a><br><a href= [url]http://www.zahui.com/html/4/7425.htm>[/url]升级到2003后访问数据库发生8007007f错误的解决</a><br><a href= [url]http://www.zahui.com/html/4/7426.htm>[/url]为 Html 的 Select 加一个提示语和输入方法</a><br><a href= [url]http://www.zahui.com/html/4/7427.htm>[/url]项目中的模块</a><br><a href= [url]http://www.zahui.com/html/4/7428.htm>SQL[/url]自定义函数的应用</a><br></td></tr></table>
- </span></td>
- </tr>
- <tr>
- <td>
- <span class="unnamed2">
- <table><tr><td><fieldset class="Text2"><legend><b>所有分类</b></legend><a href= [url]http://www.zahui.com/html/1/>Visual[/url] C++</a><br><a href= [url]http://www.zahui.com/html/2/>Delphi</a><br><a[/url] href= [url]http://www.zahui.com/html/3/>Visual[/url] Basic</a><br><a href= [url]http://www.zahui.com/html/4/>ASP</a><br><a[/url] href= [url]http://www.zahui.com/html/5/>Perl</a><br><a[/url] href= [url]http://www.zahui.com/html/6/>Java</a><br><a[/url] href= [url]http://www.zahui.com/html/7/>Javascript</a><br><a[/url] href= [url]http://www.zahui.com/html/8/>[/url]数据库开发</a><br><a href= [url]http://www.zahui.com/html/9/>[/url]其他开发语言</a><br><a href= [url]http://www.zahui.com/html/10/>[/url]游戏开发</a><br><a href= [url]http://www.zahui.com/html/11/>[/url]文件格式</a><br><a href= [url]http://www.zahui.com/html/12/>[/url]网站制作技术</a><br><a href= [url]http://www.zahui.com/html/13/>[/url]其他</a><br><a href= [url]http://www.zahui.com/html/14/>.NET</a><br></td></tr></table>[/url] <br>
- <table><tr><td><fieldset class="Text2"><legend><b>相关网站</b></legend><a href="[url]http://www.zahui.com/[/url]">技术大杂烩 </a><br><a href="[url]http://linuxsir.zahui.net/[/url]">linuxsir技术文档</a><br><a href="[url]http://freebsdforums.zahui.net/[/url]">freebsdforums技术文档</a><br><a href="[url]http://51js.zahui.net/[/url]">51js技术文档</a><br><a href="[url]http://cnoug.zahui.net/[/url]">cnoug技术文档</a></td></tr></table> </span>
- </td>
- </tr>
- </table>
- <div align="center">
- <script language=JavaScript src="../../foot.js"></script>
- </div>
- <table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" align="center">
- <tr align="center" bgcolor="#006633">
- <td height="27"> <span><font color="#FFFFFF">合作事项</font> <font color="#FFFFFF">|
- 业务联系</font> <font color="#FFFFFF">|</font> <font color="#FFFFFF">广告刊登</font>
- <font color="#FFFFFF">|</font> <a href=http://www.zhaocount.com><font color="#FFFFFF">计数器</font></a>
- <font color="#FFFFFF">|</font> <a href="javascript:window.external.AddFavorite('[url]http://www.ZaHui.com/[/url]','技术大杂烩')"><font color="#FFFFFF">加入收藏</font></a></span></td>
- </tr>
- <tr bgcolor="#F6F6F6" align="center" valign="bottom">
- <td height="29">[ <a href="[url]http://www.zahui.com[/url]">[url]www.ZaHui.com</a>[/url]
- ]
- </td>
- </tr>
- <tr bgcolor="#F6F6F6" align="center">
- <td height="29">Copyright © 2000-2004 <a href="[url]http://www.zahui.com[/url]">[url]www.ZaHui.com</a>[/url]
- All rights reserved
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td valign=top align=left width=10 background="../../images/bg_right.gif" height="231"><img src="../../images/blank.gif" width="8" height="1"></td>
- </tr>
- </tbody>
- </table>
- <script>var a="zahui";</script>
- <script src="[url]http://www.zahui.com/stat.js[/url]"></script>
- </body>
- </html>
|