📄 ypadd.asp
字号:
<%dbdns="../../"%>
<!--#include file="../../inc/conn.asp"-->
<%if session("admin")="" then
response.redirect "../index.asp"
end if%>
<%=citycss%>
<%sql = "select * from ypxxtwo order by date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%count = 0
do while not rs.eof%>
subcat[<%=count%>] = new Array("<%= trim(rs("ypxxtwo"))%>","<%= trim(rs("ypxxone_id"))%>","<%= trim(rs("ypxxtwo_id"))%>");
<%count = count + 1
rs.movenext
loop
rs.close
set rs=nothing%>
onecount=<%=count%>;
function changelocation(ypxxone)
{
document.addform.ypxxtwo_id.length = 0;
var ypxxone_id=ypxxone_id;
var i;
document.addform.ypxxtwo_id.options[0] = new Option('请选择小类','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == ypxxone)
{
document.addform.ypxxtwo_id.options[document.addform.ypxxtwo_id.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<%sql = "select * from ypaddtwo order by date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1%>
<script language = "JavaScript">
var onecount1;
onecount1=0;
subcat1 = new Array();
<%count = 0
do while not rs.eof%>
subcat1[<%=count%>] = new Array("<%= trim(rs("addtwo"))%>","<%= trim(rs("addone_id"))%>","<%= trim(rs("addtwo_id"))%>");
<%count = count + 1
rs.movenext
loop
rs.close
set rs=nothing%>
onecount1=<%=count%>;
function changelocation1(addone)
{
document.addform.addtwo_id.length = 0;
var addone_id=addone_id;
var i;
document.addform.addtwo_id.options[0] = new Option('请选择市','');
for (i=0;i < onecount1; i++)
{
if (subcat1[i][1] == addone)
{
document.addform.addtwo_id.options[document.addform.addtwo_id.length] = new Option(subcat1[i][0], subcat1[i][2]);
}
}
}
</script>
<br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1">
<form name="addform" method="post" action="ypsave.asp?action=add" onSubmit="return checkdata()">
<tr bgcolor="#cccccc">
<td colspan=2 height="25"> <strong>::企业登录信息::</strong></td>
</tr>
<tr bgcolor="#efefef">
<td width="23%" align="center">登录用户名</td>
<td width="77%" height="25"> <input name="user" type="text" size="20" maxlength="16"> 2-16个字符</td>
</tr>
<tr bgcolor="#efefef">
<td align="center">登录密码</td>
<td height="25"> <input name="pass" type="password" size="20" maxlength="16"> 4-16个字符</td>
</tr>
<tr bgcolor="#cccccc">
<td colspan=2 height="25"> <strong>::企业基本资料::</strong></td>
</tr>
<tr bgcolor="#efefef">
<td align="center">选择行业</td>
<td height="25"> <select name="ypxxone_id" onChange="changelocation(document.addform.ypxxone_id.options[document.addform.ypxxone_id.selectedIndex].value)">
<option value="" selected>请选择大类</option>
<%
sql="select * from ypxxone order by date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("ypxxone_id")%>"><%=rs("ypxxone")%></option>
<%rs.movenext
wend
rs.Close()
%>
</select>
<select name="ypxxtwo_id">
<option selected value="">请选择小类</option>
</select></td>
</tr>
<tr bgcolor="#efefef">
<td align="center">公司名称</td>
<td height="25"> <input name="coname" type="text" size="40" maxlength="20"></td>
</tr>
<tr bgcolor="#efefef">
<td align="center">联系人</td>
<td height="25"> <input name="colxr" type="text" size="10" maxlength="5"> <input name="colxrsex" type="radio" value="先生" checked style="border:0px">先生 <input name="colxrsex" type="radio" value="小姐" style="border:0px">小姐</td>
</tr>
<tr bgcolor="#efefef">
<td align="center">选择地区</td>
<td height="25"> <select name="addone_id" onChange="changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value)">
<option value="" selected>请选择省</option>
<%
sql="select * from ypaddone order by date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("addone_id")%>"><%=rs("addone")%></option>
<%rs.movenext
wend
rs.Close()
%>
</select>
<select name="addtwo_id">
<option selected value="">请选择市</option>
</select></td>
</tr>
<tr bgcolor="#efefef">
<td align="center">详细地址</td>
<td height="25"> <input name="coaddress" type="text" size="40" maxlength="40"> 请填写市级以下的包括“区、县、街道、门牌”等详细地址</td>
</tr>
<tr bgcolor="#efefef">
<td align="center">联系电话</td>
<td height="25"> <input name="cotelq" type="text" size="5" maxlength="4"> - <input name="cotel" type="text" size="10" maxlength="8"> 请填写电话区号</td>
</tr>
<tr bgcolor="#efefef">
<td align="center">联系邮箱</td>
<td height="25"> <input name="mail" type="text" size="40" maxlength="40"></td>
</tr>
<tr align="center" bgcolor="#cccccc">
<td colspan="2" height="25"><input type="submit" name="Submit" value="下一步" class="input1"></td>
</tr>
</form>
</table>
<script language="javascript">
changelocation(document.addform.ypxxone_id.options[document.addform.ypxxone_id.selectedIndex].value);
</script>
<script language="javascript">
changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value);
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -