📄 addad.asp
字号:
if(dcardid.substring(dcardid.length - 1,dcardid.length).toUpperCase()!=strJiaoYan[intTemp])
{
alert("身份证末位验证码失败!")
return false;
}
}
else
{
alert("身份证号长度必须为15或18!")
return false;
}
return true;
}
if (document.postart.dtitle.value.length<1)
{
alert("请填写信息标题!");
document.postart.dtitle.focus();
return false;
}
if (document.postart.dlei.value=="选择信息类别")
{
alert("请选择信息类别!");
document.postart.dlei.focus();
return false;
}
if (document.postart.dtext.value.length>1500)
{
alert("请把信息内容的字数控制在1500以内!");
document.postart.dtext.focus();
return false;
}
if (document.postart.dusername.value.length == 0) {
alert("请您填写联系人姓名!");
document.postart.dusername.focus();
return false;
}
var str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,./'[]{}`1234567890-=\~!@#$%^&*()_+|?><:";
var errorChar
errorChar = isCharsInBag(postart.dusername.value,str)
if (errorChar != "" )
{
alert('联系人姓名必须是中文!');
postart.dusername.focus();
return false;
}
function isCharsInBag (s, bag)
{
var i,c;
for (i = 0; i < s.length; i++)
{
c = s.charAt(i);//字符串s中的字符
if (bag.indexOf(c) > -1)
return c;
}
return "";
}
if(document.postart.dusername.value.length<2||document.postart.dusername.value.length>4){
alert("联系人姓名不能少于2字多于4字!");
document.postart.dusername.focus();
return false;
}
<%if webcardid="1" then%>
if (document.postart.dcardid.value.length == 0) {
alert("请填写您的身份证号!");
document.postart.dcardid.focus();
return false;
}
if(checkCard(document.postart.dcardid.value)==false)
{
document.postart.dcardid.focus();
return false;
}
<%end if%>
if (document.postart.dtel.value.length<7)
{
alert("请填写您的联系电话,不能小于七位数!");
document.postart.dtel.focus();
return false;
}
if (document.postart.dstop.value=="选择有效期")
{
alert("请选择有效期!");
document.postart.dstop.focus();
return false;
}
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
maxLen = 1500;
function checkMaxInput(form) {
if (form.dtext.value.length > maxLen)
form.remLen.value = 0;
else form.remLen.value = maxLen - form.dtext.value.length;
}
// End -->
</script>
<script language="javascript" type="text/javascript">
<!--
function changeColor(o) {
document.getElementById("colorBox").style.color = o.value;
}
//-->
</script>
<script language="javascript" type="text/javascript">
<!--
function changeColor1(o) {
document.getElementById("colorBox1").style.background = o.value;
}
//-->
</script>
</head>
<body background="images/background.gif">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
<tr>
<td height="20" bgcolor="#799AE1" align="center"><font color="#FFFFFF" style="font-size:14px"><%=session("china_city")%>分站---发布分类信息</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> <br>
<div align="center">
<form action="" method="post" name="postart" onsubmit="return checkadd()">
<table width="98%" height="420" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
<tr>
<td width="27%" height="26" align="right" bgcolor="#FFFFFF">信息标题:</td>
<td height="26" colspan="2" bgcolor="#FFFFFF">
<input type="text" name="dtitle" size="40" maxlength="40">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td width="27%" height="26" align="right" bgcolor="#FFFFFF">是否加粗:</td>
<td height="26" colspan="2" bgcolor="#FFFFFF">
<input type="radio" value="no" name="dcu">
否
<input type="radio" value="yes" name="dcu" checked>
是</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right" bgcolor="#FFFFFF">标题颜色:</td>
<td height="26" bgcolor="#FFFFFF">
<input name="dcolor" type="text" id="dcolor" size="8" onchange="changeColor(this);" />
<input type="button" name="Submit" value="选择颜色" onclick="window.open('../colorpicker.html', 'colorPicker', 'width=200, height=160');" />
</td>
<td rowspan="2" align="center" bgcolor="#FFFFFF">
<table width="180" height="24" border="0" cellpadding="0" cellspacing="1" bgcolor="#cae2f8">
<tr>
<td align="center" bgColor="#EFF7FE">
<div id="colorBox1" style="width: 180px;height: 24px">
<table width="166" border="0" cellspacing="0" cellpadding="0" height="5">
<tr>
<td></td>
</tr>
</table>
<div id="colorBox"><font style="font-size:14px"><b>标题和背景颜色演示</b></font></div>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right" bgcolor="#FFFFFF">标题背景:</td>
<td height="26" bgcolor="#FFFFFF">
<input name="dbgcolor1" type="text" id="dbgcolor1" size="8" onchange="changeColor1(this);" />
<input type="button" name="Submit" value="选择颜色" onclick="window.open('../colorpicker1.html', 'colorPicker', 'width=200, height=160');" />
</td>
</tr>
<tr>
<td width="27%" height="26" align="right" bgcolor="#FFFFFF">选择城市:</td>
<td height="26" colspan="2" bgcolor="#FFFFFF">
<%
set rsi=conn.execute("select * from china_city where id>0 and twoid>0 and threeid=0")
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
dim count:count = 0
do while not rsi.eof
%>
subcat[<%=count%>] = new Array("<%=rsi("city")%>","<%=rsi("id")%>","<%=rsi("twoid")%>");
<%
count = count + 1
rsi.movenext
loop
rsi.close
set rsi=nothing
%>
onecount=<%=count%>;
</script>
<%
set rsi=conn.execute("select * from china_city where id>0 and twoid>0 and threeid>0")
%>
<script language = "JavaScript">
var onecount4;
onecount4=0;
subcat4 = new Array();
<%
dim count4:count4 = 0
do while not rsi.eof
%>
subcat4[<%=count4%>] = new Array("<%=rsi("city")%>","<%=rsi("id")%>","<%=rsi("twoid")%>","<%=rsi("threeid")%>");
<%
count4 = count4 + 1
rsi.movenext
loop
rsi.close
set rsi = nothing
%>
onecount4=<%=count4%>;
function changelocation(locationid)
{
document.postart.city_two.length = 0;
document.postart.city_two.options[0] = new Option('选择城市','');
document.postart.city_three.length = 0;
document.postart.city_three.options[0] = new Option('选择城市','');
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.postart.city_two.options[document.postart.city_two.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function changelocation4(locationid,locationid1)
{
document.postart.city_three.length = 0;
document.postart.city_three.options[0] = new Option('选择城市','');
var locationid=locationid;
var locationid1=locationid1;
var i;
for (i=0;i < onecount4; i++)
{
if (subcat4[i][2] == locationid)
{
if (subcat4[i][1] == locationid1)
{
document.postart.city_three.options[document.postart.city_three.length] = new Option(subcat4[i][0], subcat4[i][3]);
}
}
}
}
</script>
<select name="city_one" size="1" id="select2" onChange="changelocation(document.postart.city_one.options[document.postart.city_one.selectedIndex].value)">
<%set rsi=conn.execute("select * from china_city where id="&session("oneid")&" and twoid=0")
if rsi.eof or rsi.bof then
response.write "<option value=''>没有分类</option>"
else
do until rsi.eof
response.write "<option value='"&rsi("id")&"'>"&rsi("city")&"</option>"
rsi.movenext
loop%>
<%end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -