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

📄 addhw1.jsp

📁 jsp做的网络购物系统 功能全面 有用户界面和管理界面 供大家学习哦
💻 JSP
字号:
<%
if session("admin_name")="" then response.end
dim count
set rs=server.createobject("adodb.recordset")

%>
<!--#include file="conn.asp"--><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=../css.css rel=STYLESHEET type=text/css>

</head>

<table border="0" width="500" cellspacing="1" height="392" align="left">
  <tr>
    <td>
      <div align="center"><b>所有选项都必须填写</b></div>
    </td>
  </tr><tr>
    <td width="100%" height="395"> 
      <form method="POST" action="addhw.asp?action=save">
        <table border="0" width="100%" cellspacing="1">
          <tr> 
            <td width="27%"><font color="#FF0000">型号名称</font> 
              <input type="text" name="hw_name" size="20" class=input>
              <font color="#FF0000"> &nbsp;&nbsp;&nbsp;&nbsp; </font></td>
            <td width="10%"><font color="#FF0000">商品类别 </font> </td>
            <td width="63%"> 
              <%
        sql = "select * from sort"
        rs.open sql,conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from  Nsort  order by Nsort_id asc"
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("Nsort_name"))%>","<%= trim(rs("sort_id"))%>","<%= trim(rs("Nsort_id"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.Nsort_id.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.Nsort_id.options[document.myform.Nsort_id.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
              <select name="sort_id" onChange="changelocation(document.myform.sort_id.options[document.myform.sort_id.selectedIndex].value)" size="1">
        <option selected value="<%=trim(rs("sort_id"))%>"><%=trim(rs("sort_name"))%></option>
<%      dim selclass
         selclass=rs("sort_id")
        rs.movenext
        do while not rs.eof
%>
        <option value="<%=trim(rs("sort_id"))%>"><%=trim(rs("sort_name"))%></option>
       
<%
        rs.movenext
        loop
	end if
        rs.close
%>
       </select> 
    
    <select name="Nsort_id">                  
<%sql="select * from Nsort where sort_id="&selclass
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
        <option selected value="<%=rs("Nsort_ID")%>"><%=rs("Nsort_name")%></option>
<% rs.movenext
do while not rs.eof%>
        <option value="<%=rs("Nsort_ID")%>"><%=rs("Nsort_name")%></option>
<% rs.movenext
loop
end if
        rs.close
        set rs = nothing
        conn.Close
        set conn = nothing
%>
    </select>**</td>
          </tr>
          <tr> 
            <td colspan="3"><font color="#FF0000">市场价</font> 
              <input type="text" name="pifa" size="7" class=input>
              元 <font color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;会员价</font> 
              <input type="text" name="hw_cash" size="7" class=input>
              元 <font color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;VIP价</font> 
              <input type="text" name="daili" size="7" class=input>
              元 </td>
          </tr>
          <tr> 
            <td height="5" colspan="3"> 
              <hr noshade size="1">
            </td>
          </tr>
          <tr> 
            <td colspan="2"><font color="#CCCCCC">录入</font> 
              <input type="text" name="hwsn" size="10" class=input value="不详">
            </td>
            <td width="63%"><font color="#CCCCCC">出品公司</font> 
              <input type="text" name="chubsh" size="30" class=input value="不详">
            </td>
          </tr>
          <tr> 
            <td colspan="2"><font color="#CCCCCC">尺码</font> 
              <input type="text" name="kaiben" size="10" class=input value="16">
            </td>
            <td width="63%"><font color="#CCCCCC">出品日期</font> 
              <input type="text" name="data" size="24" class=input value="2002-10-10">
              格式:2002-10-10</td>
          </tr>
          <tr> 
            <td colspan="2"><font color="#CCCCCC">颜色</font> 
              <input type="text" name="yeshu" size="10" class=input value="100">
            </td>
            <td width="63%"><font color="#CCCCCC">编号</font> 
              <input type="text" name="isbn" size="30" class=input value="不详">
            </td>
          </tr>
          <tr> 
            <td height="5" colspan="3"> 
              <hr noshade size="1">
            </td>
          </tr>
          <tr> 
            <td colspan="3"> <font color="#CCCCCC">包装类型</font> 
              <input type="text" name="zhuang" size="30" class=input value="普通">
            </td>
          </tr>
          <tr> 
            <td colspan="3"> <font color="#FF0000">内容简介 </font></td>
          </tr>
          <tr> 
            <td valign="top" colspan="3"> 
              <textarea rows="3" name="hw_content" cols="50" class=input>暂时没有……</textarea>
            </td>
          </tr>
          <tr> 
            <td colspan="3"> <font color="#FF0000">商品图片</font> 
              <input type="text" name="hw_pic" size="46" class=input value="http://wa169.com/book/pic/">
              <a href="../up/index.asp" target="_blank"><font color="#FF0000">图形上传</font></a></td>
          </tr>
        </table>
        <p><input type="submit" value="提交" name="B1" class=input><input type="reset" value="全部重写" name="B2" class=input></p>
      </form>
      
    </td>
  </tr>
</table>

⌨️ 快捷键说明

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