-
Notifications
You must be signed in to change notification settings - Fork 0
/
product_credobeauty.html
94 lines (80 loc) · 2.24 KB
/
product_credobeauty.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#product-container {
display: flex;
width: 80%;
margin: auto;
height: 400px;
}
#product-image {
flex: 1;
}
#product-image>img {
padding: 10px;
width: 100%;
}
#brandname {
margin-top: 100px;
font-size: 30px;
color: rgb(214, 160, 11);
}
#productdetails {
font-size: 30px;
margin-top: 10px;
}
#prodictprice {
margin-top: 30px;
font-size: 25px;
color: black;
font-weight: bold;
}
#product-details {
flex: 1;
padding: 30px;
}
#new-function{
margin-top: 100px;
display: flex;
}
button{
margin: 0px 15px;
}
</style>
</head>
<body>
<div id="product-container">
<div id="product-image">
<img src="" alt="" id="image">
</div>
<div id="product-details">
<div id="brandname"></div>
<!-- <div id="productname"></div> -->
<div id="productdetails"></div>
<div id="prodictprice"></div>
<div id="new-function">
<div> <button>Go To Home</button> </div>
<div><button id="btn">Add To Cart</button> </div>
</div>
</div>
</div>
</body>
</html>
<script>
let cart = JSON.parse(localStorage.getItem("Clicked_items"))
console.log(cart.name)
let image = document.getElementById("image").src = cart.imgUrl1;
let brand = document.getElementById("brandname").innerText = cart.brand
let name = document.getElementById("productdetails").innerText = cart.name
let details = document.getElementById("prodictprice").innerText = `Price: $ ${cart.price}`
let btn=document.getElementById("btn")
btn.onclick=()=>{
localStorage.setItem("Cart_Items",JSON.stringify(cart))
alert()
};
</script>