驗證碼 生成 二三例(一般處理程式,封裝一個類)
第一種方法:使用一般處理程式Handler
第一步:準備工作, 做一張驗證碼底圖圖片,放在程式的一個資料夾內,例如app_data內
第二步:新增一般處理程式ImageHandler,繼承IHttpHandler,System.Web.SessionState.IRequiresSessionState
第三步:新增處理程式,程式碼如下
Code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--> 1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5
6namespace AA
7{
8 /**////
9 /// 生成驗證碼程式
10 ///
11
12 public class ImageHandler : IHttpHandler,System.Web.SessionState.IRequiresSessionState
13 {
14
15 public void ProcessRequest(HttpContext context)
16 {
17 context.Response.ContentType = "image/jpeg";
18 string path = "~/app_data/code.jpg";
19 string filepath = context.Server.MapPath(path);
20 System.Drawing.Image image = System.Drawing.Image.FromFile(filepath);
21 // 使用隨機數生成隨機數
22 //System.Random random = new Random();
23 //int code = random.Next(1000, 10000);
24 //string codeString = code.ToString();
25 // 藉助 Guid 生成隨機驗證碼
26 System.Guid guid = System.Guid.NewGuid();
27 string codeString = guid.ToString().Substring(0, 4); //擷取四位
28 // 使用會話狀態
29 context.Session["Code"] = codeString;
30 using (System.Drawing.Graphics g
31 = System.Drawing.Graphics.FromImage(image))
32 {
33 g.DrawString(
34 codeString,
35 new System.Drawing.Font("Arial", 14),
36 System.Drawing.Brushes.Blue,
37 3, 3);
38 } //將驗證碼寫到圖片上
39 context.Response.ContentType = "image/jpeg";
40 image.Save(
41 context.Response.OutputStream,
42 System.Drawing.Imaging.ImageFormat.Jpeg
43 );
44 }
45
46 public bool IsReusable
47 {
48 get
49 {
50 return false;
51 }
52 }
53 }
54}
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--> 1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5
6namespace AA
7{
8 /**////
9 /// 生成驗證碼程式
10 ///
11
12 public class ImageHandler : IHttpHandler,System.Web.SessionState.IRequiresSessionState
13 {
14
15 public void ProcessRequest(HttpContext context)
16 {
17 context.Response.ContentType = "image/jpeg";
18 string path = "~/app_data/code.jpg";
19 string filepath = context.Server.MapPath(path);
20 System.Drawing.Image image = System.Drawing.Image.FromFile(filepath);
21 // 使用隨機數生成隨機數
22 //System.Random random = new Random();
23 //int code = random.Next(1000, 10000);
24 //string codeString = code.ToString();
25 // 藉助 Guid 生成隨機驗證碼
26 System.Guid guid = System.Guid.NewGuid();
27 string codeString = guid.ToString().Substring(0, 4); //擷取四位
28 // 使用會話狀態
29 context.Session["Code"] = codeString;
30 using (System.Drawing.Graphics g
31 = System.Drawing.Graphics.FromImage(image))
32 {
33 g.DrawString(
34 codeString,
35 new System.Drawing.Font("Arial", 14),
36 System.Drawing.Brushes.Blue,
37 3, 3);
38 } //將驗證碼寫到圖片上
39 context.Response.ContentType = "image/jpeg";
40 image.Save(
41 context.Response.OutputStream,
42 System.Drawing.Imaging.ImageFormat.Jpeg
43 );
44 }
45
46 public bool IsReusable
47 {
48 get
49 {
50 return false;
51 }
52 }
53 }
54}
第四步:頁面新增引用,注意Form必須有runat="server"標記
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><asp:Image ID="Image1" ImageUrl="~/ImageHandler.ashx" runat="server" />
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><asp:Image ID="Image1" ImageUrl="~/ImageHandler.ashx" runat="server" />
第二種方法 使用驗證碼類,可以自由定義長度,字型等
第一步:定義一個驗證碼類,封裝驗證碼的各個屬性,程式碼如下
Code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--> 1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Drawing;
6using System.Web;
7
8public class VerifyCode
9{
10 驗證碼長度(預設5個驗證碼的長度)#region 驗證碼長度(預設5個驗證碼的長度)
11 int length = 5;
12 public int Length
13 {
14 get { return length; }
15 set { length = value; }
16 }
17 #endregion
18
19 驗證碼字型大小(預設10畫素)#region 驗證碼字型大小(預設10畫素)
20 int fontSize = 10;
21 public int FontSize
22 {
23 get { return fontSize; }
24 set { fontSize = value; }
25 }
26 #endregion
27
28 邊框補(預設1畫素)#region 邊框補(預設1畫素)
29 int padding = 1;
30 public int Padding
31 {
32 get { return padding; }
33 set { padding = value; }
34 }
35 #endregion
36
37 是否輸出燥點(預設不輸出)#region 是否輸出燥點(預設不輸出)
38 bool chaos = true;
39 public bool Chaos
40 {
41 get { return chaos; }
42 set { chaos = value; }
43 }
44 #endregion
45
46 輸出燥點的顏色(預設灰色)#region 輸出燥點的顏色(預設灰色)
47 Color chaosColor = Color.LightGray;
48 public Color ChaosColor
49 {
50 get { return chaosColor; }
51 set { chaosColor = value; }
52 }
53 #endregion
54
55 自定義背景色(預設白色)#region 自定義背景色(預設白色)
56 Color backgroundColor = Color.White;
57 public Color BackgroundColor
58 {
59 get { return backgroundColor; }
60 set { backgroundColor = value; }
61 }
62 #endregion
63
64 自定義隨機顏色陣列#region 自定義隨機顏色陣列
65 Color[] colors = { Color.Black, Color.Red, Color.DarkBlue, Color.Green, Color.Orange, Color.Brown, Color.DarkCyan, Color.Purple };
66 public Color[] Colors
67 {
68 get { return colors; }
69 set { colors = value; }
70 }
71 #endregion
72
73 自定義字型陣列#region 自定義字型陣列
74 string[] fonts = { "Arial", "Georgia" };
75 public string[] Fonts
76 {
77 get { return fonts; }
78 set { fonts = value; }
79 }
80 #endregion
81
82
83
84 自定義隨機碼字串序列(使用逗號分隔)#region 自定義隨機碼字串序列(使用逗號分隔)
85 string codeSerial = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
86 public string CodeSerial
87 {
88 get { return codeSerial; }
89 set { codeSerial = value; }
90 }
91 #endregion
92
93 生成校驗碼圖片#region 生成校驗碼圖片
94 public Bitmap CreateImageCode(string code)
95 {
96 int fSize = FontSize;
97 int fWidth = fSize + Padding;
98 int imageWidth = (int)(code.Length * fWidth) + 4 + Padding * 2;
99 int imageHeight = fSize * 2 + Padding;
100 System.Drawing.Bitmap image = new System.Drawing.Bitmap(imageWidth, imageHeight);
101 Graphics g = Graphics.FromImage(image);
102 g.Clear(BackgroundColor);
103 Random rand = new Random();
104 //給背景新增隨機生成的燥點
105 if (this.Chaos)
106 {
107 Pen pen = new Pen(ChaosColor, 0);
108 int c = Length * 10;
109 for (int i = 0; i < c; i++)
110 {
111 int x = rand.Next(image.Width);
112 int y = rand.Next(image.Height);
113 g.DrawRectangle(pen, x, y, 1, 1);
114 }
115 }
116 int left = 0, top = 0, top1 = 1, top2 = 1;
117 int n1 = (imageHeight - FontSize - Padding * 2);
118 int n2 = n1 / 4;
119 top1 = n2;
120 top2 = n2 * 2;
121 Font f;
122 Brush b;
123 int cindex, findex;
124 //隨機字型和顏色的驗證碼字元
125 for (int i = 0; i < code.Length; i++)
126 {
127 cindex = rand.Next(Colors.Length - 1);
128 findex = rand.Next(Fonts.Length - 1);
129 f = new System.Drawing.Font(Fonts[findex], fSize, System.Drawing.FontStyle.Bold);
130 b = new System.Drawing.SolidBrush(Colors[cindex]);
131 if (i % 2 == 1)
132 {
133 top = top2;
134 }
135 else
136 {
137 top = top1;
138 }
139 left = i * fWidth;
140 g.DrawString(code.Substring(i, 1), f, b, left, top);
141 }
142 //畫一個邊框 邊框顏色為Color.Gainsboro
143 g.DrawRectangle(new Pen(Color.Gainsboro, 0), 0, 0, image.Width - 1, image.Height - 1);
144 g.Dispose();
145 return image;
146 }
147 #endregion
148
149 將建立好的圖片輸出到頁面#region 將建立好的圖片輸出到頁面
150 public void CreateImageOnPage(string code, HttpContext context)
151 {
152 System.IO.MemoryStream ms = new System.IO.MemoryStream();
153 Bitmap image = this.CreateImageCode(code);
154 image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
155 context.Response.ClearContent();
156 context.Response.ContentType = "image/Jpeg";
157 context.Response.BinaryWrite(ms.GetBuffer());
158 ms.Close();
159 ms = null;
160 image.Dispose();
161 image = null;
162 }
163 #endregion
164
165 生成隨機字元碼#region 生成隨機字元碼
166 public string CreateVerifyCode(int codeLen)
167 {
168 if (codeLen == 0)
169 {
170 codeLen = Length;
171 }
172 string[] arr = CodeSerial.Split(',');
173 string code = "";
174 int randValue = -1;
175 Random rand = new Random(unchecked((int)DateTime.Now.Ticks));
176 for (int i = 0; i < codeLen; i++)
177 {
178 randValue = rand.Next(0, arr.Length - 1);
179 code += arr[randValue];
180 }
181 return code;
182 }
183 public string CreateVerifyCode()
184 {
185 return CreateVerifyCode(0);
186 }
187 #endregion
188}
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--> 1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Drawing;
6using System.Web;
7
8public class VerifyCode
9{
10 驗證碼長度(預設5個驗證碼的長度)#region 驗證碼長度(預設5個驗證碼的長度)
11 int length = 5;
12 public int Length
13 {
14 get { return length; }
15 set { length = value; }
16 }
17 #endregion
18
19 驗證碼字型大小(預設10畫素)#region 驗證碼字型大小(預設10畫素)
20 int fontSize = 10;
21 public int FontSize
22 {
23 get { return fontSize; }
24 set { fontSize = value; }
25 }
26 #endregion
27
28 邊框補(預設1畫素)#region 邊框補(預設1畫素)
29 int padding = 1;
30 public int Padding
31 {
32 get { return padding; }
33 set { padding = value; }
34 }
35 #endregion
36
37 是否輸出燥點(預設不輸出)#region 是否輸出燥點(預設不輸出)
38 bool chaos = true;
39 public bool Chaos
40 {
41 get { return chaos; }
42 set { chaos = value; }
43 }
44 #endregion
45
46 輸出燥點的顏色(預設灰色)#region 輸出燥點的顏色(預設灰色)
47 Color chaosColor = Color.LightGray;
48 public Color ChaosColor
49 {
50 get { return chaosColor; }
51 set { chaosColor = value; }
52 }
53 #endregion
54
55 自定義背景色(預設白色)#region 自定義背景色(預設白色)
56 Color backgroundColor = Color.White;
57 public Color BackgroundColor
58 {
59 get { return backgroundColor; }
60 set { backgroundColor = value; }
61 }
62 #endregion
63
64 自定義隨機顏色陣列#region 自定義隨機顏色陣列
65 Color[] colors = { Color.Black, Color.Red, Color.DarkBlue, Color.Green, Color.Orange, Color.Brown, Color.DarkCyan, Color.Purple };
66 public Color[] Colors
67 {
68 get { return colors; }
69 set { colors = value; }
70 }
71 #endregion
72
73 自定義字型陣列#region 自定義字型陣列
74 string[] fonts = { "Arial", "Georgia" };
75 public string[] Fonts
76 {
77 get { return fonts; }
78 set { fonts = value; }
79 }
80 #endregion
81
82
83
84 自定義隨機碼字串序列(使用逗號分隔)#region 自定義隨機碼字串序列(使用逗號分隔)
85 string codeSerial = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
86 public string CodeSerial
87 {
88 get { return codeSerial; }
89 set { codeSerial = value; }
90 }
91 #endregion
92
93 生成校驗碼圖片#region 生成校驗碼圖片
94 public Bitmap CreateImageCode(string code)
95 {
96 int fSize = FontSize;
97 int fWidth = fSize + Padding;
98 int imageWidth = (int)(code.Length * fWidth) + 4 + Padding * 2;
99 int imageHeight = fSize * 2 + Padding;
100 System.Drawing.Bitmap image = new System.Drawing.Bitmap(imageWidth, imageHeight);
101 Graphics g = Graphics.FromImage(image);
102 g.Clear(BackgroundColor);
103 Random rand = new Random();
104 //給背景新增隨機生成的燥點
105 if (this.Chaos)
106 {
107 Pen pen = new Pen(ChaosColor, 0);
108 int c = Length * 10;
109 for (int i = 0; i < c; i++)
110 {
111 int x = rand.Next(image.Width);
112 int y = rand.Next(image.Height);
113 g.DrawRectangle(pen, x, y, 1, 1);
114 }
115 }
116 int left = 0, top = 0, top1 = 1, top2 = 1;
117 int n1 = (imageHeight - FontSize - Padding * 2);
118 int n2 = n1 / 4;
119 top1 = n2;
120 top2 = n2 * 2;
121 Font f;
122 Brush b;
123 int cindex, findex;
124 //隨機字型和顏色的驗證碼字元
125 for (int i = 0; i < code.Length; i++)
126 {
127 cindex = rand.Next(Colors.Length - 1);
128 findex = rand.Next(Fonts.Length - 1);
129 f = new System.Drawing.Font(Fonts[findex], fSize, System.Drawing.FontStyle.Bold);
130 b = new System.Drawing.SolidBrush(Colors[cindex]);
131 if (i % 2 == 1)
132 {
133 top = top2;
134 }
135 else
136 {
137 top = top1;
138 }
139 left = i * fWidth;
140 g.DrawString(code.Substring(i, 1), f, b, left, top);
141 }
142 //畫一個邊框 邊框顏色為Color.Gainsboro
143 g.DrawRectangle(new Pen(Color.Gainsboro, 0), 0, 0, image.Width - 1, image.Height - 1);
144 g.Dispose();
145 return image;
146 }
147 #endregion
148
149 將建立好的圖片輸出到頁面#region 將建立好的圖片輸出到頁面
150 public void CreateImageOnPage(string code, HttpContext context)
151 {
152 System.IO.MemoryStream ms = new System.IO.MemoryStream();
153 Bitmap image = this.CreateImageCode(code);
154 image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
155 context.Response.ClearContent();
156 context.Response.ContentType = "image/Jpeg";
157 context.Response.BinaryWrite(ms.GetBuffer());
158 ms.Close();
159 ms = null;
160 image.Dispose();
161 image = null;
162 }
163 #endregion
164
165 生成隨機字元碼#region 生成隨機字元碼
166 public string CreateVerifyCode(int codeLen)
167 {
168 if (codeLen == 0)
169 {
170 codeLen = Length;
171 }
172 string[] arr = CodeSerial.Split(',');
173 string code = "";
174 int randValue = -1;
175 Random rand = new Random(unchecked((int)DateTime.Now.Ticks));
176 for (int i = 0; i < codeLen; i++)
177 {
178 randValue = rand.Next(0, arr.Length - 1);
179 code += arr[randValue];
180 }
181 return code;
182 }
183 public string CreateVerifyCode()
184 {
185 return CreateVerifyCode(0);
186 }
187 #endregion
188}
第三步:新增一個驗證碼頁面Code.aspx,新增引用VerifyCode類的程式集,注意名稱空間的是否新增了沒有
後臺程式碼新增如下:
Code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--> 1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Web.UI;
6using System.Web.UI.WebControls;
7using System.Drawing;
8using VerifyCode類的名稱空間;
9
10public partial class Code: System.Web.UI.Page
11{
12 驗證碼長度(預設5個驗證碼的長度)#region 驗證碼長度(預設5個驗證碼的長度)
13 int length = 5;
14 #endregion
15
16 驗證碼字型大小(預設10畫素)#region 驗證碼字型大小(預設10畫素)
17 int fontSize = 12;
18 #endregion
19
20 邊框補(預設1畫素)#region 邊框補(預設1畫素)
21 int padding = 1;
22 #endregion
23
24 是否輸出燥點(預設輸出)#region 是否輸出燥點(預設輸出)
25 bool chaos = true;
26 #endregion
27
28 輸出燥點的顏色(預設灰色)#region 輸出燥點的顏色(預設灰色)
29 Color chaosColor = System.Drawing.Color.Pink;
30 #endregion
31
32 自定義背景色(預設白色)#region 自定義背景色(預設白色)
33 Color backgroundColor = Color.White;
34 #endregion
35
36 自定義隨機顏色陣列#region 自定義隨機顏色陣列
37 Color[] colors = { Color.Black, Color.Red, Color.DarkBlue, Color.Green, Color.Orange, Color.Brown, Color.DarkCyan, Color.Purple };
38 #endregion
39
40
41 自定義字型陣列#region 自定義字型陣列
42 string[] fonts = { "Arial", "Georgia" };
43 #endregion
44
45 自定義隨機碼字串序列(使用逗號分隔)#region 自定義隨機碼字串序列(使用逗號分隔)
46 string codeSerial = "1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,P,Q,R,S,T,U,V,W,X,Y,Z";
47 #endregion
48
49 protected void Page_Load(object sender, EventArgs e)
50 {
51 VerifyCode v = new VerifyCode();
52 v.Length = this.length;
53 v.FontSize = this.fontSize;
54 v.Chaos = this.chaos;
55 v.BackgroundColor = this.backgroundColor;
56 v.ChaosColor = this.chaosColor;
57 v.CodeSerial = this.codeSerial;
58 v.Colors = this.colors;
59 v.Fonts = this.fonts;
60 v.Padding = this.padding;
61 string code = v.CreateVerifyCode(); //取隨機碼
62 v.CreateImageOnPage(code, this.Context); // 輸出圖片
63 Session["CheckCode"] = code.ToLower(); // 使用Session["CheckCode"]取驗證碼的值
64 //Response.Cookies.Add(new HttpCookie("CheckCode", code.ToLower()));// 使用Cookies取驗證碼的值
65 }
66}
67
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--> 1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Web.UI;
6using System.Web.UI.WebControls;
7using System.Drawing;
8using VerifyCode類的名稱空間;
9
10public partial class Code: System.Web.UI.Page
11{
12 驗證碼長度(預設5個驗證碼的長度)#region 驗證碼長度(預設5個驗證碼的長度)
13 int length = 5;
14 #endregion
15
16 驗證碼字型大小(預設10畫素)#region 驗證碼字型大小(預設10畫素)
17 int fontSize = 12;
18 #endregion
19
20 邊框補(預設1畫素)#region 邊框補(預設1畫素)
21 int padding = 1;
22 #endregion
23
24 是否輸出燥點(預設輸出)#region 是否輸出燥點(預設輸出)
25 bool chaos = true;
26 #endregion
27
28 輸出燥點的顏色(預設灰色)#region 輸出燥點的顏色(預設灰色)
29 Color chaosColor = System.Drawing.Color.Pink;
30 #endregion
31
32 自定義背景色(預設白色)#region 自定義背景色(預設白色)
33 Color backgroundColor = Color.White;
34 #endregion
35
36 自定義隨機顏色陣列#region 自定義隨機顏色陣列
37 Color[] colors = { Color.Black, Color.Red, Color.DarkBlue, Color.Green, Color.Orange, Color.Brown, Color.DarkCyan, Color.Purple };
38 #endregion
39
40
41 自定義字型陣列#region 自定義字型陣列
42 string[] fonts = { "Arial", "Georgia" };
43 #endregion
44
45 自定義隨機碼字串序列(使用逗號分隔)#region 自定義隨機碼字串序列(使用逗號分隔)
46 string codeSerial = "1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,P,Q,R,S,T,U,V,W,X,Y,Z";
47 #endregion
48
49 protected void Page_Load(object sender, EventArgs e)
50 {
51 VerifyCode v = new VerifyCode();
52 v.Length = this.length;
53 v.FontSize = this.fontSize;
54 v.Chaos = this.chaos;
55 v.BackgroundColor = this.backgroundColor;
56 v.ChaosColor = this.chaosColor;
57 v.CodeSerial = this.codeSerial;
58 v.Colors = this.colors;
59 v.Fonts = this.fonts;
60 v.Padding = this.padding;
61 string code = v.CreateVerifyCode(); //取隨機碼
62 v.CreateImageOnPage(code, this.Context); // 輸出圖片
63 Session["CheckCode"] = code.ToLower(); // 使用Session["CheckCode"]取驗證碼的值
64 //Response.Cookies.Add(new HttpCookie("CheckCode", code.ToLower()));// 使用Cookies取驗證碼的值
65 }
66}
67
第三步:在驗證碼引用頁面新增程式碼
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><asp:Image id="Image1" runat="server" ImageUrl="~/Code.aspx">asp:Image>
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><asp:Image id="Image1" runat="server" ImageUrl="~/Code.aspx">asp:Image>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12639172/viewspace-617173/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 自用驗證類封裝封裝
- 爬蟲驗證碼的幾種處理方式,已封裝成類,文章末尾有原始碼!爬蟲封裝原始碼
- Python驗證碼識別處理例項Python
- 生成驗證碼程式程式碼
- Node教程——封裝一個token驗證器封裝
- 一個C#封裝的加密解密類程式碼C#封裝加密解密
- QTP處理驗證碼的一種方法QT
- JavaFx 生成二維碼工具類封裝Java封裝
- PHP封裝的一個單例模式Mysql操作類PHP封裝單例模式MySql
- javascript實現的生成驗證碼隨機數程式碼例項JavaScript隨機
- 題目:設計一個類,我們只能生成該類的一個例項。 程式碼如下
- Python生成驗證碼例項講解Python
- 驗證碼影像處理(JavaScript 版)JavaScript
- 隨機生成四個驗證碼隨機
- ASP.NET MVC許可權驗證 封裝類ASP.NETMVC封裝
- javascript字串操作程式碼封裝程式碼例項JavaScript字串封裝
- jquery 驗證碼效果程式碼例項jQuery
- 5種PHP生成圖片驗證碼例項PHP
- 【例項】使用GD庫生成圖片驗證碼
- asp.net 一般處理程式接收SessionASP.NETSession
- 封裝javascript事件處理函式繫結和解綁程式碼封裝JavaScript事件函式
- JavaScript驗證碼生成和驗證效果JavaScript
- 短視訊平臺原始碼,取驗證碼 封裝全部封裝好直接呼叫原始碼封裝
- jQuery加法驗證碼效果程式碼例項jQuery
- 001.01 一般網頁爬蟲處理範例網頁爬蟲
- python爬蟲之處理驗證碼Python爬蟲
- JavaScript 表單驗證程式碼例項JavaScript
- 郵箱格式驗證程式碼例項
- captcha.js一個生成驗證碼的外掛,使用js和canvas生成APTJSCanvas
- Flutter 驗證碼倒數計時Widget封裝Flutter封裝
- iOS開發 - 隨機圖片驗證碼封裝iOS隨機封裝
- 登入驗證碼生成kaptcha(輸入驗證碼)APT
- 將建立程式的API-posix_spawn封裝成一個程式類API封裝
- Flutter 註解處理及程式碼生成Flutter
- javascript獲取元素封裝程式碼例項JavaScript封裝
- 原生ajax()函式封裝程式碼例項函式封裝
- java隨機動態生成漢字驗證碼圖片的例項程式碼分享Java隨機
- javascript實現的驗證碼程式碼例項JavaScript