會員注冊關閉
點擊輸入框顯示驗證碼
作者:未知來源:網絡收集
整理日期:2011-05-29
vb 代碼復制內容到剪貼板
- <%
- if request("cur_action")="add" then
- code=Request.Form("code")
- if code=empty then
- response.write "<script LANGUAGE='javascript'>alert('請輸入驗證碼!');history.go(-1);</script>"
- Session("GetCode")=empty
- response.End()
- elseif lcase(code)<>lcase(Session("GetCode")) then
- response.write "<script LANGUAGE='javascript'>alert('您輸入驗證碼出錯!');history.go(-1);</script>"
- Session("GetCode")=empty
- response.End()
- Else
- Response.Write "<script>alert('登陸成功');history.back();</script>"
- response.End()
- end if
- end if
- %>
- <form name="form" method="post" action="index.asp">
- <SCRIPT LANGUAGE=javascript>
- /*顯示認證碼 o start1*/
- function get_Code() {
- var Dv_CodeFile = "Dv_GetCode.asp";
- if(document.getElementById("imgid"))
- document.getElementById("imgid").innerHTML = '<img src="'+Dv_CodeFile+'?t='+Math.random()+'" alt="點擊刷新驗證碼" style="cursor:pointer;border:0;vertical-align:middle;height:18px;" onclick="this.src=''+Dv_CodeFile+'?t='+Math.random()" />'
- }
- /*o end*/
- </script>
- <script language="JavaScript" type="text/javascript">
- var dvajax_request_type = "GET";
- </script>
- <script language="JavaScript" src="dv_ajax.js" type="text/javascript"></script>
- <tr>
- <td style="width:100px; text-align:right">驗證碼:</td>
- <td style="width:150px; text-align:left"><!--驗證碼表單-->
- <p>
- <input type="text" name="code" id="code" size="4" maxlength="4" tabindex="6" onfocus="get_Code();this.onfocus=null;" onkeyup="dv_ajaxcheck('checke_dvcode','code');" />
- <span id="imgid" style="color:red">點擊獲取驗證碼</span><span id="isok_code"></span></p>
- <input name="cur_action" type="hidden" value="add">
- <input name="提交" type="submit" id="提交">
- </td>
- </tr>
- </form>
責任編輯: webmaster >>> 百度上搜索 谷歌上搜索
點擊復制本連接 (http://www.walela49.com/showarticle.php?id=3259)【聲明】: 以上文章或資料除注明為電腦技巧原創或編輯整理外,均為網絡收集整理或網友推薦。以上內容以共享、參考、研究為目的,不存在任何商業目的。 未注明作者或出處的文章,可能資料來源不規范。如有涉及版權請給予及時聯系更正或予以刪除。 |