第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

照著代碼敲的, 在模態(tài)窗口這里出問題了, 不知道什么問題。。

我照著代碼敲的,為什么放入購物車之后的模態(tài)窗口顯示不出來, 就是點擊加入購物車沒反應(yīng)。 老師什么問題呢?


<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %>

<%@ page import="entity.Items"%>

<%@ page import="dao.ItemsDao" %>

<%

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

? <head>

? ? <base href="<%=basePath%>">

? ??

? ? <title>My JSP 'details.jsp' starting page</title>

? ??

<meta http-equiv="pragma" content="no-cache">

<meta http-equiv="cache-control" content="no-cache">

<meta http-equiv="expires" content="0">? ??

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

<meta http-equiv="description" content="This is my page">

<link href="css/main.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="js/lhgcore.js"></script>

? ? <script type="text/javascript" src="js/lhgdialog.js"></script>

? ? <script type="text/javascript">

? ? ? function selflog_show(id)

? ? ? {?

? ? ? alter("test...")

? ? ? ? ?var num =? document.getElementById("number").value;?

? ? ? ? ?J.dialog.get({id: 'haoyue_creat',title: '購物成功',width: 600,height:400, link: '<%=path%>/servlet/CartServlet?id='+id+'&num='+num+'&action=add', cover:true});

? ? ? }

? ? ?function add()

? ? ? {

? ? ? ? ?var num = parseInt(document.getElementById("number").value);

? ? ? ? ?if(num<100)

? ? ? ? ?{

? ? ? ? ? ? document.getElementById("number").value = ++num;

? ? ? ? ?}

? ? ? }

? ? ? function sub()

? ? ? {

? ? ? ? ?var num = parseInt(document.getElementById("number").value);

? ? ? ? ?if(num>1)

? ? ? ? ?{

? ? ? ? ? ? document.getElementById("number").value = --num;

? ? ? ? ?}

? ? ? }

? ? </script>

? ? <style type="text/css">

? ?hr{

? ? ??

? ? ?border-color:FF7F00;?

? ?}

? ?

? ?div{

? ? ? float:left;

? ? ? margin-left: 30px;

? ? ? margin-right:30px;

? ? ? margin-top: 5px;

? ? ? margin-bottom: 5px;

? ? ?

? ?}

? ?div dd{

? ? ? margin:0px;

? ? ? font-size:10pt;

? ?}

? ?div dd.dd_name

? ?{

? ? ? color:blue;

? ?}

? ?div dd.dd_city

? ?{

? ? ? color:#000;

? ?}

? ?div #cart

? ?{

? ? ?margin:0px auto;

? ? ?text-align:right;?

? ?}

? ?span{

? ? ?padding:0 2px;border:1px #c0c0c0 solid;cursor:pointer;

? ?}

? ?a{

? ? ? text-decoration: none;?

? ?}

</style>

? </head>

??

? <body>

? ? <h1>商品詳情</h1>

? ? <a href="index.jsp">首頁</a> >> <a href="index.jsp">商品列表</a>

? ? <hr>

? ? <center>

? ? ? <table width="750" height="60" cellpadding="0" cellspacing="0" border="0">

? ? ? ? <tr>

? ? ? ? ? <!-- 商品詳情 -->

? ? ? ? ? <%

? ? ? ? ? ItemsDao itemDao = new ItemsDao();

? ? ? ? ? Items item = itemDao.getItemsById(Integer.parseInt(request.getParameter("id")));

? ? ? ? ? if(item !=null)

? ? ? ? ? {

? ? ? ? ? %>

? ? ? ? ??

? ? ? ? ? <td width="70%" valign="top">

? ? ? ? ? ? ?<table>

? ? ? ? ? ? ? ?<tr>

? ? ? ? ? ? ? ? ?<td rowspan="5"><img src="images/<%=item.getPicture()%>" width="200" height="160"/></td>

? ? ? ? ? ? ? ?</tr>

? ? ? ? ? ? ? ?<tr>

? ? ? ? ? ? ? ? ?<td><B><%=item.getName() %></B></td>?

? ? ? ? ? ? ? ?</tr>

? ? ? ? ? ? ? ?<tr>

? ? ? ? ? ? ? ? ?<td>產(chǎn)地:<%=item.getCity()%></td>

? ? ? ? ? ? ? ?</tr>

? ? ? ? ? ? ? ?<tr>

? ? ? ? ? ? ? ? ?<td>價格:<%=item.getPrice() %>¥</td>

? ? ? ? ? ? ? ?</tr>

? ? ? ? ? ? ? ?<tr>

? ? ? ? ? ? ? ? ?<td>購買數(shù)量:<span id="sub" onclick="sub();">-</span><input type="text" id="number" name="number" value="1" size="2"/><span id="add" onclick="add();">+</span></td>

? ? ? ? ? ? ? ?</tr>?

? ? ? ? ? ? ?</table>

? ? ? ? ? ? ?<div id="cart">

? ? ? ? ? ? ? ?<img src="images/buy_now.png">

? ? ? ? ? ? ? ?<a href="javascript:selflog_show(<%=item.getId()%>)"><img src="images/in_cart.png"></a>

? ? ? ? ? ? ? ?<a href="servlet/CartServlet?action=show"><img src="images/view_cart.jpg"/></a>

? ? ? ? ? ? ?</div>

? ? ? ? ? </td>

? ? ? ? ? <%?

? ? ? ? ? ? }

? ? ? ? ? %>

? ? ? ? ? <%?

? ? ? ? ? ? ? String list ="";

? ? ? ? ? ? ? //從客戶端獲得Cookies集合

? ? ? ? ? ? ? Cookie[] cookies = request.getCookies();

? ? ? ? ? ? ? //遍歷這個Cookies集合

? ? ? ? ? ? ? if(cookies!=null&&cookies.length>0)

? ? ? ? ? ? ? {

? ? ? ? ? ? ? for(Cookie c:cookies)

? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? if(c.getName().equals("ListViewCookie"))

? ? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? ?list = c.getValue();

? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? }

? ? ? ? ? }

? ? ? ? ? ? ??

? ? ? ? ? ? ? list+=request.getParameter("id")+",";

? ? ? ? ? ? ? //如果瀏覽記錄超過1000條,清零.

? ? ? ? ? ? ? String[] arr = list.split(",");

? ? ? ? ? ? ? if(arr!=null&&arr.length>0)

? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? if(arr.length>=1000)

? ? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? ? list="";

? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? }

? ? ? ? ? ? ? Cookie cookie = new Cookie("ListViewCookie",list);

? ? ? ? ? ? ? response.addCookie(cookie);

? ? ? ? ??

? ? ? ? ? %>

? ? ? ? ? <!-- 瀏覽過的商品 -->

? ? ? ? ? <td width="30%" bgcolor="#EEE" align="center">

? ? ? ? ? ? ?<br>

? ? ? ? ? ? ?<b><font color="#FF7F00">您瀏覽過的商品</font></b><br>

? ? ? ? ? ? ?<!-- 循環(huán)開始 -->

? ? ? ? ? ? ?<%?

? ? ? ? ? ? ? ? ArrayList<Items> itemlist = itemDao.getViewList(list);

? ? ? ? ? ? ? ? if(itemlist!=null&&itemlist.size()>0 )

? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ?for(Items i:itemlist)

? ? ? ? ? ? ? ? ? ?{

? ? ? ? ? ? ? ? ? ? ? ? ?

? ? ? ? ? ? ?%>

? ? ? ? ? ? ?<div>

? ? ? ? ? ? ?<dl>

? ? ? ? ? ? ? ?<dt>

? ? ? ? ? ? ? ? ?<a href="details.jsp?id=<%=i.getId()%>"><img src="images/<%=i.getPicture() %>" width="120" height="90" border="1"/></a>

? ? ? ? ? ? ? ?</dt>

? ? ? ? ? ? ? ?<dd class="dd_name"><%=i.getName() %></dd>?

? ? ? ? ? ? ? ?<dd class="dd_city">產(chǎn)地:<%=i.getCity() %>&nbsp;&nbsp;價格:<%=i.getPrice() %> ¥ </dd>?

? ? ? ? ? ? ?</dl>

? ? ? ? ? ? ?</div>

? ? ? ? ? ? ?<%?

? ? ? ? ? ? ? ? ? ?}

? ? ? ? ? ? ? ? }

? ? ? ? ? ? ?%>

? ? ? ? ? ? ?<!-- 循環(huán)結(jié)束 -->

? ? ? ? ? </td>

? ? ? ? </tr>

? ? ? </table>

? ? </center>

? </body>

</html>


正在回答

1 回答

alter("test...")

var num =? document.getElementById("number").value;?

后面的符號????

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

照著代碼敲的, 在模態(tài)窗口這里出問題了, 不知道什么問題。。

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號