⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addad.asp

📁 一个综合类整站
💻 ASP
📖 第 1 页 / 共 3 页
字号:

                                 var intTemp=0;

                                 for(i = 0; i < dcardid.length - 1; i++)

                                 intTemp +=  dcardid.substring(i, i + 1)  * intQuan[i];  

                                 intTemp %= 11;

                                 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.city_one.value=="")
	{
        alert("请您选择城市!");
        document.postart.city_one.focus();
        return false;
    }
    if (document.postart.type_one.value=="")
	{
        alert("请选择信息类别!");
        document.postart.type_one.focus();
        return false;
    }
	if (document.postart.dtext.value.length<1)
	{
        alert("请填写信息内容!");
        document.postart.dtext.focus();
        return false;
    }
    if (document.postart.dtext.value.length>20000)
	{
        alert("请把信息内容的字数控制在200000以内!");
        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>20){
		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 = 200000;
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">发 布 分&nbsp;类&nbsp;信&nbsp;息</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">
                否&nbsp; 
                <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 rs=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 rs.eof 
        %>
subcat[<%=count%>] = new Array("<%=rs("city")%>","<%=rs("id")%>","<%=rs("twoid")%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
		set rs=nothing
        %>
onecount=<%=count%>;
</script>
<%
set rs=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 rs.eof 
        %>
subcat4[<%=count4%>] = new Array("<%=rs("city")%>","<%=rs("id")%>","<%=rs("twoid")%>","<%=rs("threeid")%>");
        <%
        count4 = count4 + 1
        rs.movenext
        loop
        rs.close
		set rs = 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('选择城市','');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -