<div id="middle"> <div id="form"> <form action="ProductInfoServlet?tag=add" method="post" enctype="multipart/form-data" > <h2>三只松鼠--新增</h2> <table align="center"> <tr> <td width="90px" class="td">类型:</td> <td width="200px" > <select name="typename"> <option>---请选择--</option> <c:forEach items="${tlist }" var="type" varStatus="status"> <option value="${type.typeId}">${type.typeName }</option> </c:forEach> </select> </td> </tr> <tr> <td width="90px" class="td">品牌:</td> <td width="200px" > <select name="brand"> <option>---请选择--</option> <option >三只松鼠</option> </select> </td> </tr> <tr> <td width="90px" class="td">名称:</td> <td> <input type="text" name="produceName" id="name"> </td> </tr> <tr> <td width="90px" class="td">详情介绍:</td> <td> <textarea cols="20px" rows="1px" name="details"></textarea> </td> </tr> <tr> <td width="90px" class="td">价格:</td> <td> <input type="text" name="price" id="price"> </td> </tr> <tr> <td width="90px" class="td">库存:</td> <td> <input type="text" name="stock" id="price"> </td> </tr> <tr> <td width="90px" class="td">大图:</td> <td> <input type="file" name="bigfile" id="price"> </td> </tr> <tr> <td width="90px" class="td">小图1:</td> <td> <input type="file" name="smallfile1" id="price"> </td> </tr> <tr> <td width="90px" class="td">小图2:</td> <td> <input type="file" name="smallfile2" id="price"> </td> </tr> <tr> <td width="90px" class="td">小图3:</td> <td> <input type="file" name="smallfile3" id="price"> </td> </tr> <tr> <td colspan="2"><input type="submit" value="新增"> <input type="button" value="取消"></td> </tr> </table> </form> </div> </div>
css样式:
<style type="text/css"> #middle { width:100%; height:600px; border:1px #000000; background-image:url(media/image/bg/2.jpg); color:#FFF; padding-top:110px; } h2{ text-align:center; padding-top:10px; } #form { text-align:center; border: #999 1px solid; height:560px; width:600px; margin:0px auto; background-color:#ACACAC; opacity:0.02px; box-shadow:0px 0px 100px; } #form .td { font-size:18px; font-weight:bolder; } #form td { padding-top:10px; } </style>
温馨提示:此方法得用到两个jar包,需要的请前往这里下载!!!