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

📄 editad.asp

📁 一个综合类整站
💻 ASP
📖 第 1 页 / 共 3 页
字号:
                                 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>20000)
	{
        alert("请把信息内容的字数控制在20000以内!");
        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 = 20000;
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">
 <div align="center">
 <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">编 辑 信 息 内 容</font></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF"> <br>
      <form action="" method="post" name="postart" onsubmit="return checkadd()">
          <table width="98%" border="0" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
            <tr bgcolor="#FFFFFF"> 
              <td width="27%" height="26" align="right">信息标题:</td>
              <td height="26" colspan="2"> 
                <input type="text" name="dtitle" size="40" maxlength="40" value="<%=rs("title")%>">
                <font color="#FF0000">*<%=rs("ip")%></font></td>
            </tr>
            <tr bgcolor="#FFFFFF"> 
              <td height="26" align="right">是否加粗:</td>
              <td height="26" colspan="2"> 
                <input type="radio" value="no" <%if rs("cu")="no" then%>checked<%end if%> name="dcu">
                否&nbsp; 
                <input type="radio" value="yes" name="dcu" <%if rs("cu")="yes" then%>checked<%end if%>>
                是</td>
            </tr>
            <tr bgcolor="#FFFFFF"> 
              <td align="right">标题颜色:</td>
              <td width="160" height="26"> 
                <input name="dcolor" type="text" id="dcolor" onchange="changeColor(this);" value="<%=rs("color")%>" size="8" />
                <input type="button" name="Submit" value="选择颜色" onclick="window.open('../colorpicker.html', 'colorPicker', 'width=200, height=160');" />
              </td>
              <td rowspan="2"> 
                <div align="center"> 
                  <table width="182" height="24" border="0" cellpadding="0" cellspacing="1" bgcolor="#cae2f8">
                    <tr> 
                      <td align="center" <%if rs("bgcolor1")<>"" then%>bgcolor="<%=rs("bgcolor1")%>"<%else%>bgcolor="#EFF7FE"<%end if%>> 
                        <table width="166" border="0" cellspacing="0" cellpadding="0" height="5">
                          <tr> 
                            <td></td>
                          </tr>
                        </table>
                        <font style="font-size:14px" color="<%if rs("color")<>"" then%><%=rs("color")%><%else%>#000000<%end if%>"><b>原来的标题颜色</b></font></td>
                    </tr>
                  </table>
                  <table width="166" border="0" cellspacing="0" cellpadding="0" height="2">
                    <tr> 
                      <td></td>
                    </tr>
                  </table>
                  <table width="182" height="24" border="0" cellpadding="0" cellspacing="1" bgcolor="#CAE2F8">
                    <tr> 
                      <td align="center" <%if rs("bgcolor1")<>"" then%>bgcolor="<%=rs("bgcolor1")%>"<%else%>bgcolor="#EFF7FE"<%end if%>> 
                        <div id="colorBox1" style="width: 180px;height: 24px"> 
                          <table width="166" border="0" cellspacing="0" cellpadding="0" height="5">
                            <tr> 
                              <td></td>
                            </tr>
                          </table>
                          <font style="font-size:14px" color="<%if rs("color")<>"" then%><%=rs("color")%><%else%>#000000<%end if%>"> 
                          <div id="colorBox"><b>修改后标题颜色</b></div>
                          </font> </div>
                      </td>
                    </tr>
                  </table>
                </div>
              </td>
            </tr>
            <tr bgcolor="#FFFFFF"> 
              <td align="right">标题背景:</td>
              <td height="26"> 
                <input name="dbgcolor1" type="text" id="dbgcolor1" onchange="changeColor1(this);" value="<%=rs("bgcolor1")%>" size="8" />
                <input type="button" name="Submit" value="选择颜色" onclick="window.open('../colorpicker1.html', 'colorPicker', 'width=200, height=160');" />
              </td>
            </tr>
            <tr bgcolor="#FFFFFF"> 
			  <td height="26" align="right">选择城市:</td>
              <td height="26" colspan="2"> 
                <%
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)">
        <option value="" selected>选择城市</option>
  <%  set rsi=conn.execute("select * from china_city where id>0 and twoid=0 and threeid=0")
if rsi.eof or rsi.bof then
response.write "<option value=''>没有分类</option>"
else
do until rsi.eof%>
  <option value="<%=rsi("id")%>" <%if rsi("id")=rs("city_oneid") then%>selected<%end if%>><%=rsi("city")%></option>
 <%rsi.movenext
    loop
	%>
	<%end if
rsi.close
set rsi = nothing
%>
   </select>
      <select name="city_two" id="city_two" onChange="changelocation4(document.postart.city_two.options[document.postart.city_two.selectedIndex].value,document.postart.city_one.options[document.postart.city_one.selectedIndex].value)">

⌨️ 快捷键说明

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