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

📄 publish.jsp

📁 基于jsp+javabean+mysql三层结构的动态购物网站。网站用户接口(即界面)由jsp完成
💻 JSP
字号:
<%@ include file = "../../config.jsp" %>
<%@ page contentType="text/html;charset=GBK"%>
<jsp:useBean id="ManagerCatalog" scope="page" class="myshop.catalog_sys.ManagerCatalog"/>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../style" rel="stylesheet" type="text/css">
<script language="javascript" src=../check.js></script>
<script language="javascript">
	function CheckForm(TheForm) {
		trimform(TheForm);

		if (TheForm.name.value == "") {
			alert ("请填写商品名称!");
			TheForm.name.focus();
			return(false);
		}

		if (TheForm.description.value == "") {
			alert ("请填写商品简介!");
			TheForm.description.focus();
			return(false);
		}

		if (!chknumber(TheForm.price.value) || TheForm.price.value == "") {
			alert ("请正确填写商品价格!");
			TheForm.price.focus();
			return(false);
		}

		if (TheForm.catalog_id.value == 0) {
			alert ("请选择商品所属的货架!");
			TheForm.catalog_id.focus();
			return(false);
		}
	return(true);
	}

<%=ManagerCatalog.CheckPareid(tb_shop_catalog)%>
</script>
</head>

<body>
<form action="publish_post.jsp" method="post" name="form1" onSubmit="return CheckForm(this)">
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr bgcolor="#33CCFF"> 
            <td colspan="2"><p>商品操作 -&gt; 发布商品</p></td>
          </tr>
          <tr> 
            <td width="19%" bgcolor="eeeeee">商品名称:</td>
            <td width="81%" bgcolor="eeeeee"><input name="name" type="text" id="name" size="60"></td>
          </tr>
          <tr> 
            <td bgcolor="eeeeee">商品描述:</td>
            <td bgcolor="eeeeee"><textarea name="description" cols="50" rows="10" id="description"></textarea></td>
          </tr>
          <tr> 
            <td bgcolor="eeeeee">关键字:</td>
            <td bgcolor="eeeeee"><input name="keywords" type="text" id="keywords">
              (个数不限,用<font color="#FF0000">,</font>隔开)</td>
          </tr>
          <tr>
            <td bgcolor="eeeeee">商品价格:</td>
            <td bgcolor="eeeeee"><input name="price" type="text" id="price"></td>
          </tr>
          <tr> 
            <td bgcolor="eeeeee">所属货架:</td>
            <td bgcolor="eeeeee"><select name="catalog_id" id="catalog_id" onChange="CheckParentid(this.value)">
                <option value="0" selected>选择货架</option>
<%
out.print(ManagerCatalog.ListCatalog(tb_shop_catalog));
%>
              </select></td>
          </tr>
          <tr> 
            <td bgcolor="eeeeee">精彩推介:</td>
            <td valign="middle" bgcolor="eeeeee">否 
              <input type="radio" name="show_out" value="0" checked>
              <input type="radio" name="show_out" value="1"></td>
          </tr>
          <tr> 
            <td bgcolor="eeeeee">商品图片:</td>
            <td bgcolor="eeeeee"> <iframe name="ad" frameborder=0 width=100% height=40 scrolling=no src=upload.jsp></iframe> 
            </td>
          </tr>
          <tr valign="middle"> 
            <td colspan="2" align="center" bgcolor="eeeeee"><input name="Submit" type="submit" value="发布"> 
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

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