脚本突然就不能用了,菜鸟找不出原因所在,请指教!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
img {border:none;}
#sjcz_mail_box {width:976px; height:auto; margin:5px auto 5px auto; background: url(images/sjcz_main_bg.jpg) repeat-y top left;}
#sjcz_foot { height:12px; }
#zjcz_tip { height:43px; width:926px; border: solid 1px #85dbc8; margin:15px auto; background: url(images/sjcz_tip_bg.jpg) repeat-x left;}
#zjcz_tip h1{ font-size:14px; margin:15px auto 0 15px; padding:0;}
#sjcz_form{ padding-left:75px;}
#sjcz_form .sjcz_form_intro { font-size:14px; float:left; padding-right:15px; width:111px; text-align:right;}
label{ font-size:14px}
#sjcz_epl { width:911px; height:120px; border:dashed 1px #d7d7d7; background-color:#fbfbfb; margin:15px auto; padding-left:15px;}
#sjcz_epl h2{ font-size:14px; margin:10px auto 10px 10px; padding:0;}
#sjcz_epl_text{font-size:12px; line-height:18px;}
-->
</style>
<script language="javascript" type="text/javascript">
function ipt_focus(th)
{
th.select();
}
/*****号码验证*****/
function sjNumCheck()
{
var frm = document.forms["sjcz_form"];
if(frm['sjcz_num'].value != frm['sjcz_conferm'].value)
{
document.getElementById('sjcz_form_conf').style.color = "red";
document.getElementById('sjcz_form_conf').innerHTML = "*你输入的电话不一致,请核对后再次输入!";
}
else
{
document.getElementById('sjcz_form_conf').style.color = "green";
document.getElementById('sjcz_form_conf').innerHTML = "电话号码一致";
}
}
/*****按键验证,仅限输入数字和减号键*****/
function key_check(evnt)
{
var key_num;
if(evnt.keyCode)
{
key_num = evnt.keyCode;
}
if(evnt.which)
{
key_num = evnt.which;
}
if(key_num == 45 || key_num <= 57 && key_num >= 48)
return key_num;
else
return false;
}
/*****表单验证*****/
function form_check()
{
var frm = document.forms["sjcz_form"];
var fnl_rt;
/****提交前判断是否号码一致***/
if(frm['sjcz_num'].value != frm['sjcz_conferm'].value)
{
alert("您输入的电话号码不一致,请检查后输入!")
frm['sjcz_num'].select();
fnl_rt = false;
}
else
{
/****验证输入的号码是否为正常位数****/
if(frm['sjcz_num'].value.length > 13 || frm['sjcz_num'].value.length < 11)
{
alert("您输入的号码位数不正确,请检查后再次输入!");
frm['sjcz_num'].select();
fnl_rt = false;
}
else
{
var sj_num = frm['sjcz_num'].value;
var sj_yy = getRdVln("yunYing");
var sj_xm = getRdVln("xiangmu");
var sj_je = getRdVln("jin_e");
var fnl_rt = confirm("你要充值的是 " + sj_yy + " 的 " + sj_xm + "\n\n" +
"你要充值的" + sj_xm + "号码为: " + sj_num + "\n\n" +
"你要充值金额为: " + sj_je + "元\n\n" +
"请确认以上信息正确,点击确定继续,点击取消返回修改信息!"
);
}
}
return fnl_rt;
}
/* dfdfd*/
function getRdVln(title)
{
var frm = document.forms["sjcz_form"];
var temValue;
for(var i = 0; i<frm.length; i++)
{
if(frm[i].name != title || frm[i].checked != true)
{
continue;
}
else
{
temValue = frm[i].value;
}
}
return temValue;
}
</script>
</head>
<body>
<div id="sjcz_mail_box">
<div id="sjcz_head"><img src="images/sjcz_main_head.jpg" alt="点点网手机充值频道;充值有优惠;到账速度快" /></div>
<div id="zjcz_tip"><h1>手机充值优惠:在点点网充值话费一率9.9折!</h1></div>
<div id="sjcz_form">
<form id="sjcz_form" name="sjcz_form" >
<span class="sjcz_form_intro">电话号码:</span>
<input type="text" name="sj_num1" id="sjcz_num" value="请输入电话号码" onkeypress = "return key_check(event)" onfocus="ipt_focus(this)"/>
<p />
<span class="sjcz_form_intro">再次输入号码:</span>
<input type="text" name="sj_num2" id="sjcz_conferm" onblur="sjNumCheck()" onkeypress = "return key_check(event)" onfocus="ipt_focus(this)"/>
<span id="sjcz_form_conf" style="font-size:12px; padding-left:40px;"></span>
<p />
<span class="sjcz_form_intro">请选择运营商:</span>
<label for="yidong">移动</label><input type="radio" name="yunYing" value="移动" checked="checked" class="sj_yy" id="yidong" />
<label for="liantong">联通</label><input type="radio" name="yunYing" value="联通" class="sj_yy" id="liantong" />
<label for="dianxin">电信</label><input type="radio" name="yunYing" value="电信" class="sj_yy" id="dianxin" />
<p />
<span class="sjcz_form_intro">充值项目:</span>
<label for="shouji">手机</label><input type="radio" name="xiangmu" id="shouji" value="手机" checked="checked" class="sj_xm" />
<label for="guhua">固话</label><input type="radio" name="xiangmu" id="guhua" value="固话" class="sj_xm" />
<label for="xiaolingtong">小灵通</label><input type="radio" name="xiangmu" id="xiaolingtong" value="小灵通" class="sj_xm" />
<p />
<span class="sjcz_form_intro">充值金额:</span>
<label for="jin_e1">30</label><input type="radio" name="jin_e" value="30" id="jin_e1" checked="checked" />
<label for="jin_e2">50</label><input type="radio" name="jin_e" value="50" id="jin_e2" />
<label for="jin_e3">100</label><input type="radio" name="jin_e" value="100" id="jin_e3" />
<label for="jin_e4">200</label><input type="radio" name="jin_e" value="200" id="jin_e4" />
<p />
<span class="sjcz_form_intro">附加码:</span>
<input type="text" name="fujiama" />
<p />
<div id="sjcz_fjm" style="position:relative; left:130px; background-color:#CCCCCC; width:80px;">附加码区</div>
<br />
<a href="#" style="font-size:12px; color:red; position:relative; left:130px;">看不清,换一张</a>
<p />
<input type="submit" value="" style="background:url(images/sjcz_submit.gif) no-repeat left; width:147px; height:32px; border:none; position:relative; left:120px;" onclick="return form_check()"/>
</form>
</div>
<div id="sjcz_epl">
<h2>请您留意:</h2>
<div id="sjcz_epl_text">
移动、联通、电信手机充值:支持全国地区(移动手机除河北、港澳台地区)<br />
此为快速充值,30分钟内快速到账; 充值超30分钟未完成时,将会进行退款!<br />
30元移动手机充值支持地区为上海、浙江、江苏、广东、河南、云南、北京、山东、辽宁、吉林<br />
本充值不参加当地运营商活动!充值金额可能分多次到帐!<br />
</div>
</div>
<div id="sjcz_foot"><img src = "images/sjcz_main_foot.jpg" alt="点点网手机充值频道;充值有优惠;到账速度快" /></div>
</div>
</body>
</html>