<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <base href="<%=basePath%>"> <title></title> <link rel="stylesheet" href="admin/css/basic.css" type="text/css" /> <link rel="stylesheet" href="admin/css/goods.css" type="text/css" /> <script type="text/javascript" src="admin/js/goods.js"></script> </head> <body> <form action="goodsNew" method="post"> <div class="fillIn"> <table cellpadding="0" cellspacing="0"> <tr class="explain"> <td colspan="8">新增商品内容</td> </tr> <tr class="item"> <td class="key">商品编号</td> <td class="value">1</td> <td class="key">商品类型</td> <td class="value"> <select name="classifyId" onblur="javascript:ajaxBrandbyclassifyId(this);"> <c:forEach var="item" items="${pcList}" varStatus="i"> <option value="${item.products_classify_id }" <c:if test="${pItem.classifyId eq item.products_classify_id }">selected="selected"</c:if>>${item.products_classify_content }</option> </c:forEach> </select> </td> <td class="key">商品品牌</td> <td class="value"> <select name="brandId" id="brand"> <option>--请先择类型--</option> </select> </td> <td class="key">商品型号</td> <td class="value"><input type="text" value="请输入型号" name="model" style=" width:120px;" />(50字节之内)</td> </tr> <tr class="item"> <td class="key">商品价格</td> <td class="value"><input type="text" value="100.00" name="price" style="width:60px;" /> </td> <td class="key">商品库存</td> <td class="value"><input type="text" value="1" name="number" style="width:42px;" /> </td> <td class="key">商品状态</td> <td class="value"> <select name="statusId"> <c:forEach var="item" items="${psList}" varStatus="i"> <option value="${item.products_status_id }" <c:if test="${pItem.status_id eq '1' }">selected="selected"</c:if>>${item.products_status_content }</option> </c:forEach> </select> </td> <td class="key">上传时间</td> <td class="value">默认你插入数据的时间</td> </tr> <tr class="item"> <td class="key">商品介绍</td> <td class="value" colspan="9"><input type="text" value="请输入介绍" name="introduce" style=" width:920px;" />(120字节之内)</td> </tr> <tr class="item"> <td class="key">商品描述</td> <td class="value" colspan="9"><input type="text" value="请输入描述" name="bewrite" style=" width:920px;" />(120字节之内)</td> </tr> <tr class="update"> <td colspan="8"><input type="submit" class="submit f_r" value="新增" /> </td> </tr> </table> </div> </form> <div style="height:30px;"></div> </body> </html>
/* CSS Document */ .submit{ background:#f7661f; color:#fff; text-align:center; width:46px; height:21px; line-height:21px; border:none; border-radius:3px; font-family:"Arial";} .submit:hover{ background:#ff971c;} .search{ width:1100px; margin:0 auto 20px auto;} .search table{width:100%; border:1px solid #ccc;} .searchInput{ background:#f4f4f4; height:34px;} .searchInput form{ display:inline; margin-left:10px; margin-right:8px;} .searchInput .text{ border:1px solid #ccc; height:18px; line-height:18px; padding-left:6px; font-family:"Arial"; width:80px;} .fillIn{ width:1100px; margin:0 auto;} .fillIn table{ width:100%; border-top:1px solid #ccc; border-left:1px solid #ccc;} .fillIn table td{ height:21px; text-align:center; border-bottom:1px solid #ccc; border-right:1px solid #ccc;} .fillIn table .explain td{ background:#f4f4f4; font-family:"微软雅黑"; color:#333; font-weight:bold;} .fillIn table .item .key{ background:#436da8; color:#fff; font-family:"微软雅黑";} .fillIn table .item .value{ color:#333; font-family:"微软雅黑";} .fillIn table .item .value input{ color:#c00; border:none; font-family:"微软雅黑";} .fillIn table .item .value select{ color:#c00; border:none; font-family:"微软雅黑";} .fillIn table .item .value select option{ color:#c00; border:none; font-family:"微软雅黑";} .fillIn table .update td{ height:28px; padding-right:10px;} .upload{ width:1100px; margin:20px auto 0 auto;} .upload table{ width:100%; border-top:1px solid #ccc; border-left:1px solid #ccc;} .upload table td{ height:21px; text-align:center; border-bottom:1px solid #ccc; border-right:1px solid #ccc;} .upload table .explain td{ background:#f4f4f4; font-family:"微软雅黑"; color:#333; font-weight:bold;} .upload table .item .key{ background:#436da8; color:#fff; font-family:"微软雅黑"; text-align:right; padding-right:10px;} .upload table .item .value{ color:#333; font-family:"微软雅黑";} .upload table .item .value input{ color:#c00; border:none; font-family:"微软雅黑";} .upload table .item .value select{ color:#c00; border:none; font-family:"微软雅黑";} .upload table .item .value select option{ color:#c00; border:none; font-family:"微软雅黑";} .upload table .update td{ height:28px; padding-right:10px;}
//JavaScript Document function $(id){ return document.getElementById(id); } function ajaxBrandbyclassifyId(obj){ var brand = $("brand"); brand.innerHTML=""; var xmlHttp = new XMLHttpRequest(); var url = "ajaxBrandbyclassifyId?classifyId="+escape(obj.value); xmlHttp.open("GET", url);//设置一个请求 xmlHttp.onreadystatechange = function() { //设置请求完成之后处理的回调函数 if (xmlHttp.readyState == 4) {//数据返回完毕 if (xmlHttp.status == 200) {//HTTP操作正常 var text = xmlHttp.responseText;//接收返回的内容 brand.innerHTML= text; } } }; xmlHttp.send(null);//发送请求,不传递任何参数 }
效果图:
相关推荐
论坛jsp....很好的教材版本论坛jsp....很好的教材版本论坛jsp....很好的教材版本论坛jsp....很好的教材版本论坛jsp....很好的教材版本论坛jsp....很好的教材版本论坛jsp....很好的教材版本论坛jsp....很好的教材版本...
Ajax跨域实现代码(后台jsp).docx
SSH项目后台JSP页面
jspsmartupload.jar文件上传所需要的包,jspsmartupload官网已经不支持下载
[其他类别]jsp+servlet+javaBean实现MVC_jspmvc.rar[其他类别]jsp+servlet+javaBean实现MVC_jspmvc.rar[其他类别]jsp+servlet+javaBean实现MVC_jspmvc.rar[其他类别]jsp+servlet+javaBean实现MVC_jspmvc.rar[其他...
jspsmart.jar组件使用 jspsmart.jar组件使用 jspsmart.jar组件使用 jspsmart.jar组件使用
JSPSmartUpload.zip 下载JSPSmartUpload.zip 下载 包含例子
1.下载后,直接放在web项目的WebRoot/...后面一个是向后台传值时使用的编码格式,也就是给jspSmartupload使用的,和后台接受时使用的编码格式一致。 3.祝大家使用愉快,上面也是经验所得,还有什么不懂得可以互相讨论。
jspSmartUpload是由www.jspsmart.com网站开发的一个可免费使用的全功能的文件上传下载组件,适于嵌入执行上传下载操作的JSP文件中。该组件有以下几个特点: <br>1、使用简单。在JSP文件中仅仅书写三五行...
行业应用(jsp).rar行业应用(jsp).rar行业应用(jsp).rar行业应用(jsp).rar行业应用(jsp).rar行业应用(jsp).rar
完美支持中文文件下载的jspsmartUpload.jar完美支持中文文件下载的jspsmartUpload.jar完美支持中文文件下载的jspsmartUpload.jar
jspsmartupload.zip+例子
Java Web开发中的jsp-api.jar包,欢迎大家下载。
jsp概述.ppt入门jsp概述.ppt入门jsp概述.ppt入门jsp概述.ppt入门
网站建设完全手册系列图书 网站JSP后台解决方案.pdf
ssh+mysql+jsp开发自动补货后台管理系统.zip ssh+mysql+jsp开发自动补货后台管理系统.zip
基于JSP的短信增值业务后台管理系统.pdf
运用该jar包可以使用SmartUpload组建实现文件上传。由www.jspsmart.com网站开发的一个可免费使用的全功能的文件上传下载工具。
安全技术(jsp).rar安全技术(jsp).rar安全技术(jsp).rar安全技术(jsp).rar安全技术(jsp).rar