每次我点:获取验证码 都提示错误,请问是什么原因
<?php
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>aa</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<LINK rel=stylesheet type=text/css href="css/style.css">
</HEAD>
<BODY>
<?php
$action=$_GET["action"];
if ($action=='checkcode')
{
}
?>
<script language="javascript">
function Check()
{
if (document.send.ClientTel.value=="")
{
alert('请输入手机号码!');
return false;
}
return true;
}
</script>
<script src="js/jquery.js" language="javascript" type="javascript"></script>
<script type="javascript">
function get(obj)
{alert('请输入手机号码!');
if (document.send.ClientTel.value=="")
{
alert('请输入手机号码!');
return false;
}
if (document.send.ClientTel.value.length!="11")
{
alert('输入手机号码不是11位!');
return false;
}
obj.disabled = true;
$.ajax({
alert('输入手机号码不是123位!');
url: "cc/bb.php",
type: "Post",
data: "Tel=" + document.getElementById("ClientTel").value,
success: function(msg) {
obj.disabled = false;
if (msg == "error") {
alert("生成失败!请联系管理员")
return;
}
else
{
document.getElementById("ClientUcode").value=msg;
return;
}
alert(msg);
}
})
}
</script>
<div style=" margin:auto; margin-top:180px; width:300px;border:1px solid #CCCCCC; height:310px;">
<form action="aa.php?action=checkcode" method="post" name="send" onSubmit="return Check()">
<div style=" width:300px; float:left; height:310px;">
<div style=" width:290px; float:left; height:50px; margin-left:10px;"><input align="left" id="Button1" type="button" value="获取验证码" onClick="get(this)" /><input name="ClientUcode" size="20" /></div>
<div style=" width:290px; float:left; text-align:center;"><input type="image" src="images/login.gif"/></div>
</div>
</form>
</div>
</BODY>
</HTML>