<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script>
<script language="javascript" type="text/javascript">
function query() {
var waybills = document.getElementById("waybills");
if(waybills.value == '') {
alert('请输入要查询的快件单号');
$("#waybills").val('最多输入20个运单号码,以Enter隔开。');
document.form.waybills.focus();
return false;
}
var patten = /^\d{13}$/;
var listI = document.form.waybills.value.split("\r\n");
var listF = document.form.waybills.value.split("\n");
var list = null;
if(listI.length > listF.length) {
list = listI;
} else {
list = listF;
}
if(list.length >= 21) {
alert('一次最多只能查询20个快件单号');
document.form.waybills.focus();
return false;
}
for( i = 0; i < list.length; i++) {
var len = i + 1;
if(list[i].trim().length != 13 && list[i].trim().length != 0) {//ie6 提示: 行28,字符4, 错误:对象不支持此属性或方法
var msg = '输入的第%count%个快件单号长度必须等于13!';
alert(msg.replace('%count%', len));
document.form.waybills.focus();
return false;
}
if(!patten.test(list[i].trim())) {
var msg = '输入的第%count%个快件单号必须是数字,且为半角输入法!';
alert(msg.replace('%count%', len));
document.form.waybills.focus();
return false;
}
}
/*
 if (!checkIsNotEmpty(document.form.verifyImg.value)){
 alert('请输入验证码!');
 document.form.verifyImg.focus();
 return false;
 }*/ $("#form").submit() //return false; }
$(document).ready(function() {
var waybills = document.getElementById("waybills");
$("#waybills").focus(function() {
var str = '最多输入20个运单号码,以Enter隔开。';
if(str != waybills.value) {
$(this).val('')
}
}) $("#waybills").blur(function() {
if(waybills.value == '') {
$("#waybills").val('最多输入20个运单号码,以Enter隔开。');
}
})
$("#waybills").val('最多输入20个运单号码,以Enter隔开。');
})
</script>
<div class="content">
<h2 class="title">快件追踪</h2> <div class="tp_qq_list">
<h5>Query</h5>
<form action="__URL__/check" method="post" id="form" name="form">
<table id="querytb" width="598" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td valign="top" width="598">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="590">
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td class="tdtext-right-color1">
<div class="divtext-center">
输入单号
</div></td>
<td class="query-bgcolor1" height="110">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%"><label><textarea id="waybills" name="waybills" class="normal" rows="5"></textarea> </label></td>
<td width="20%"></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<div>
验 证 码
</div></td>
<td class="query-bgcolor2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20%">&nbsp;
<input id="verify" name="verify" type="text"  style="width: 90%"  >
</td>
<td width="16%" valign="middle" align="left"><img id="verifyImg" name="verifyImg" src="/verify/" alt="点击刷新验证码" style="cursor:pointer" align="absmiddle" /></td>
<td width="64%"><a> <span onClick="refurbish();" style="cursor:pointer;COLOR:#1e50a2;">刷新图片 </span> </a></td>
</tr>
</table></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td width="15%" calss="lh30">
<div class="btn1">
<a><span onClick="return query()" style="cursor:pointer;">查询</span> </a>
</div></td>
<td width="85%"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</form>
</div>
</div>
if(list[i].trim().length != 13 && list[i].trim().length != 0) {这个是第28行, 不知道是什么问题。  这个方法不是兼容的吗?//ie6 提示: 行28,字符4, 错误:对象不支持此属性或方法