<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <% 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/list.css" type="text/css" /> <script type="text/javascript" src="admin/js/goodsList.js"></script> </head> <body> <form action="goodsList?substance=${substance }&statusNum=${statusNum }&pageIndex=${pageIndex}" method="post"> <div class="show" style=" height:162px; display: none; " id="show"> </div> </form> <div class="list"> <table cellpadding="0" cellspacing="0"> <tr class="search"> <td colspan="10"> <form action="goodsList?substance=" method="get"> <input type="hidden" name="substance" value="${substance}" /> <select name="statusNum"> <option value="1">---默认---</option> <option value="1" <c:if test="${statusNum eq '1' }">selected="selected"</c:if>>按时间排序</option> <option value="2" <c:if test="${statusNum eq '2' }">selected="selected"</c:if>>按库存排序</option> <option value="3" <c:if test="${statusNum eq '3' }">selected="selected"</c:if>>按价格排序</option> </select> <input type="submit" class="submit" value="确定" /> </form> <form action="goodsList" method="get"> <input type="hidden" name="statusNum" value="${statusNum}" /> <input type="text" class="text" name="substance" value="${substance}" /> <input type="submit" class="submit" value="搜索" /> </form></td> </tr> <tr class="title"> <td>商品编号</td> <td>商品类型</td> <td>商品品牌</td> <td>商品图</td> <td>商品价格</td> <td>商品库存</td> <td>上架时间</td> <td>商品状态</td> <td>上架/下架</td> <td>操作</td> </tr> <c:forEach var="item" items="${pList }" varStatus="i"> <tr ondblclick="javascript:showSql('${item.products_id }');" class="content <c:if test="${i.index %2 ne 0 }">colorBg</c:if>"> <td>${item.products_id }</td> <td>${item.classify }</td> <td>${item.brand }</td> <td><a href="goods?id=${item.products_id}" target="_blank" title="${item.introduce} 分类:${item.classify} 品牌:${item.brand} 型号: ${item.model}"><img src="images/share/${item.print}" width="26" height="20" /> </a></td> <td><input type="text" value="${item.price }" onblur="javascript:ajaxUpdatePrice('${item.products_id }',this);" style="width:60px;" /> </td> <td><input type="text" value="${item.number }" onblur="javascript:ajaxUpdateNumber('${item.products_id }',this);" style="width:42px;" /> </td> <td>${fn:substring(item.time,0,10)}</td> <td>${item.status_content }</td> <td><c:if test="${item.grounding eq '0' }"> <img src="admin/images/grounding.png" width="22" height="22" /> </c:if> <c:if test="${item.grounding eq '1' }"> <img src="admin/images/undercarriage.png" width="22" height="22" /> </c:if></td> <td><a href="goodsUpdate?id=${item.products_id }"><img src="admin/images/tool.png" width="22" height="22" /> </a> <a href="goodsList?substance=${substance }&statusNum=${statusNum }&pageIndex=${pageIndex}&id=${item.products_id }&grounding=0"><img src="admin/images/grounding.png" width="22" height="22" /> </a> <a href="goodsList?substance=${substance }&statusNum=${statusNum }&pageIndex=${pageIndex}&id=${item.products_id }&grounding=1"><img src="admin/images/undercarriage.png" width="22" height="22" /> </a> </td> </tr> </c:forEach> <tr class="page"> <td colspan="10"><em class="f_r"> <a href="goodsList?substance=${substance }&statusNum=${statusNum }&pageIndex=1">首页</a> <a href="goodsList?substance=${substance }&statusNum=${statusNum }&pageIndex=${pageIndex-1}">上一页</a> <a href="goodsList?substance=${substance }&statusNum=${statusNum }&pageIndex=${pageIndex+1}">下一页</a> <a href="goodsList?substance=${substance }&statusNum=${statusNum }&pageIndex=${end}">尾页</a> </em><i>共${totalCount}条数据(共有${end}页,现在是第${pageIndex}页) </i> </td> </tr> </table> </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;} .show{ width:1100px; margin:0 auto;} .show table{ width:1100px; background:#FFF; border-top:1px solid #ccc; border-left:1px solid #ccc; position:fixed;top:0;margin:0 auto;} .show table td{ height:21px; text-align:center; border-bottom:1px solid #ccc; border-right:1px solid #ccc;} .show table .explain td{ background:#f4f4f4; font-family:"微软雅黑"; color:#333; font-weight:bold;} .show table .item .key{ background:#436da8; color:#fff; font-family:"微软雅黑";} .show table .item .value{ color:#333; font-family:"微软雅黑";} .show table .item .value input{ color:#c00; border:none; font-family:"微软雅黑";} .show table .item .value select{ color:#c00; border:none; font-family:"微软雅黑";} .show table .item .value select option{ color:#c00; border:none; font-family:"微软雅黑";} .show table .update td{ height:28px; padding-right:10px;} .list{ width:1100px; padding-bottom:50px; padding-top:13px; margin:0 auto;} .list table{width:100%; border:1px solid #ccc;} .search{ background:#f4f4f4; height:34px;} .search form{ display:inline; margin-left:10px; margin-right:8px;} .search .text{ border:1px solid #ccc; height:18px; line-height:18px; padding-left:6px; font-family:"Arial"; width:80px;} .search select{ border:1px solid #ccc; height:21px; line-height:18px;} .title td{ background:#436da8; color:#fff; font-family:"微软雅黑"; text-align:center; height:24px; line-height:24px;} .content td{ color:#333; font-family:"微软雅黑"; text-align:center; height:36px; line-height:24px;} .content:hover td{ background:#ff971c; color:#000;} .content td input{ color:#c00; border:none; font-family:"微软雅黑"; padding-left:4px;} .content td select{ color:#c00; border:none; font-family:"微软雅黑";} .content td option{ color:#c00; border:none; font-family:"微软雅黑";} .colorBg td{ background:#f5f5f5;} .page{ height:30px; } .page td{ padding-left:10px; padding-right:10px; border-top:1px solid #436da8;} .page td em{ margin-right:8px;} .page td em a{ border:1px solid #eee; color:#666; padding:2px 3px; margin-left:8px; font-family:"Arial";} .page td em a:hover{ color:#f60; border:1px solid #f60;} .page td i{ color:#999; font-family:"微软雅黑"; padding-left:8px;}
//JavaScript Document function $(id){ return document.getElementById(id); } function showSql(id){ var show = $("show"); show.style.display='block'; show.innerHTML=""; var xmlHttp = new XMLHttpRequest(); var url = "ajaxGoodsList?id="+escape(id); xmlHttp.open("GET", url);//设置一个请求 xmlHttp.onreadystatechange = function() { //设置请求完成之后处理的回调函数 if (xmlHttp.readyState == 4) {//数据返回完毕 if (xmlHttp.status == 200) {//HTTP操作正常 var text = xmlHttp.responseText;//接收返回的内容 show.innerHTML=text; } } }; xmlHttp.send(null);//发送请求,不传递任何参数 } function ajaxUpdatePrice(id,obj){ var xmlHttp = new XMLHttpRequest(); var url = "ajaxUpdatePrice?id="+escape(id)+"&price="+escape(obj.value); xmlHttp.open("GET", url);//设置一个请求 xmlHttp.onreadystatechange = function() { //设置请求完成之后处理的回调函数 if (xmlHttp.readyState == 4) {//数据返回完毕 if (xmlHttp.status == 200) {//HTTP操作正常 var text = xmlHttp.responseText;//接收返回的内容 alert(text); } } }; xmlHttp.send(null);//发送请求,不传递任何参数 } function ajaxUpdateNumber(id,obj){ var xmlHttp = new XMLHttpRequest(); var url = "ajaxUpdateNumber?id="+escape(id)+"&number="+escape(obj.value); xmlHttp.open("GET", url);//设置一个请求 xmlHttp.onreadystatechange = function() { //设置请求完成之后处理的回调函数 if (xmlHttp.readyState == 4) {//数据返回完毕 if (xmlHttp.status == 200) {//HTTP操作正常 var text = xmlHttp.responseText;//接收返回的内容 alert(text); } } }; xmlHttp.send(null);//发送请求,不传递任何参数 }
效果图:
相关推荐
goodsList.jsp
javabean分页程序,适合初学jsp的朋友 1、数据库表中有GoodsType表 2、新建TypeList.jsp页面 3、新建GoodsType的实体类 4、新建GoodsTypeDAO的...8、在GoodsList.jsp页面中,将JavaBean初始化的时候,要设置查询语句
并且查询出的所有类型在做成链接时都要使用URL重写 7、写一个Index.jsp页面,将GoodsList.jsp页面和TypeList.jsp页面放入框架集 8、在GoodsList.jsp页面中,将JavaBean初始化的时候,要设置查询语句 <br>
根据url获取页面源码,在源码中过滤所有商品列表,清洗数据,获得商品名和链接地址
源码+数据库文件 中软实习的训练项目 小的...时间很赶,做得很一般,没有写店铺(含商品)的管理,有兴趣的可以学习包中XXXlist.jsp然后仿照写一个 shoplist.jsp goodslist.jsp即可。后台已提供支持。只是没有写页面。
HTML简单的实现购物车
在`src`目录下面创建`views`目录,在该目录下面创建`GoodsList.js`文件,该文件的初步代码如下所示: ```react import { Component } from "react"; class GoodsList extends Component { render() { return ...
实现底部Tab栏切换:创建src\components\GoodsList.vue和Shopcart.vue文件。;实现底部Tab栏切换:创建src\router\index.js文件,导入vue、vue-router、GoodsList和Shopcart组件。;实现底部Tab栏切换:编写src\router...
分别测试商品个数为0、1、2、4、8、16时的页面显示效果# 这种场景就可以用本脚本对 list 进行裁剪## 例如 python3 cut-json-list.py -i goodslist.json -k data.list -c 8# 就是将 goodslist.json 里的 json对象...
代码,不支持html代码,不支持html代码,不支持html代码,不支持html代码,不支持html
1.新建一个组件,如:在goods文件夹下新建goodsList.vue goodsList组件 <style> </style> [removed] export default { data() { return{} }, created() { }, methods: { }, components...
Module build failed: ParseError: /Users/xuzhaoning/WeChatProjects/xbapp/src/components/goods-list/GoodsList.vue:84:1 80| font-size 18px 81| font-weight bold 82| i 83| font-size 12px
goodsList.append(name + "\t" + "¥" + price + "\t\t" + count + "\t\t" + "¥" + (price * count) + "\t\n"); (4)测试购物结算模块:Menu类中的showMainMenu()方法中添加测试代码: Pay pay = new...
浏览器课程中高级JavaScript的作业 5.表格。 列表编辑器*(带星号的问题) 环境: : 您创建了一个CRM系统,其中的列表包含产品,该外观应类似于草图: 描述 您需要实现基本的CRUD操作(创建,读取,更新,删除)。...
JSONArray arr = jsonObj.getJSONArray("goodslist"); for(int i=0;i<arr.length();i++){ JSONObject goodsObj = arr.getJSONObject(i); MainAdverDataEntity dataentity = new MainAdverDataEntity();...
leetcode中国 :grinning_cat:These share data are from my usual work and learning,hoping to ...更多详情可关注作者:小猫和猫主,您的关注,是对我们最好的支持也是我们写下去的动力,谢谢啦~ ...D
最新识货APP逆向教程,强制更新,frida反调试,抓包,drony,SocksDroid,ProxyDroid,拦截器绕过。需要的直接下载,5月31刚逆向成功。部分小结代码: import requests ..."goodsListType": "goodsList",
比如,在Goods类中有一个goodsList存放了当前的所有商品,页面的代码为: js 代码 代码如下:<f><h>…”#{Goods.goodsList}”var><h><f facetname=”header”>”Name”/>”#{Goods.select}”immediate>”#{goods.name...
-Vector<Goods> goodsList +void addGoods(Goods goods) +Vector<Goods> getAllGoods() +boolean isEmpty() +void clear() +float getTotalPrice() 3.Store:小芳便利店 主程序 Store -static final Goods[] GOODS ...
2 到goodsList页面,点击录入住宿时间,选择合适的房型,点击 立即购买 3 最后到购物车页面,点击“更新购物车”,核对自己的信息,点击“去结算”,完成预订酒店流程。 另外,回到home.vue,新