闲来没事,贴段39码条码打印的源代码。
在过12个小时就到学校了,妈妈送我时候有要伤心,不忍心看。
心情不爽,胡乱找了个东西写程序玩,就写到这个了。
发出来,万一大家用的着呢,呵呵。
//=========================================
string s0="101001101101";
string s1="110100101011";
string s2="101100101011";
string s3="110110010101";
string s4="101001101011";
string s5="110100110101";
string s6="101100110101";
string s7="101001011011";
string s8="110100101101";
string s9="101100101101";
string sx="100101101011";
string pw=Request.Params["_pwd"];
string codestr;
codestr="";
int i;
for (i=0;i<16;i++)
if (string.Equals(pw[i],s0)) codestr=codestr+s0+"0";
else if (string.Equals(pw[i],s1)) codestr=codestr+s1+"0";
else if (string.Equals(pw[i],s2)) codestr=codestr+s2+"0";
else if (string.Equals(pw[i],s3)) codestr=codestr+s3+"0";
else if (string.Equals(pw[i],s4)) codestr=codestr+s4+"0";
else if (string.Equals(pw[i],s5)) codestr=codestr+s5+"0";
else if (string.Equals(pw[i],s6)) codestr=codestr+s6+"0";
else if (string.Equals(pw[i],s7)) codestr=codestr+s7+"0";
else if (string.Equals(pw[i],s8)) codestr=codestr+s8+"0";
else if (string.Equals(pw[i],s9)) codestr=codestr+s9+"0";
else codestr=codestr+sx+"0";
Response.Write("<table border=1 width=53% height=54>");
Response.Write("<tr>");
Response.Write("<td width=100% height=48>");
for (i=0;i<206;i++)
Response.Write("<IMG SRC=images/"+codestr[i]+".jpg WIDTH=2 HEIGHT=36>");
Response.Write("</td>");
Response.Write(" </tr>");
Response.Write("</table>");
Response.Write("");
字母的代码自己加好了,不然这个程序字母统统打成x。另外打印出来没*标识符,
可以加些简单代码就完成了的。
欢迎指正!