springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-18 12:35:37
183
我在购物车中动态创建列表项。我必须得到删除项目按钮的兄弟姐妹的子值,如数量和价格,而删除购物车项目,但方法不起作用。
var cartItem= $("<li class='newItem'>
<p class='id'>"+id+"</p>
<div class='picture'><img src='"+ image +"' ></div>
<div class='details'>
<span class='weight'>"+weight+"<span> /</span>
<span class='avail'>"+availability+"</span>
<p class='price'>"+price+"</p>
<p class='name'>"+name+"<p class='quantity'>"+quantity+"</p>
</div>
<a type='button' class='removeItem'>Remove Item</a>
</li>");
$("#cartList").prepend(cartItem); //creating list item
//Remove a Cart Item
$(".removeItem").click(function(){
$(this).parent().remove();
//Show empty cart view if all items are removed
if( ($("#cartList").has("li").length === 0) ) {
$("#empty-cart").css("display","block");
$("#shipping_text, #total_amount_text").css("display", "none");
}
//Decrement in total amount while removing an item
var q = parseInt($(this).siblings('.details').children('.quantity').text());
var p =parseInt($(this).siblings('.details').children('.price').text().replace("$", ""));
console.log($(this).siblings('.details'));
total -= q*p;
$("#total_amount_text span").text(total)
})
顺晟科技:
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11