-
Notifications
You must be signed in to change notification settings - Fork 0
/
Chitietsanpham.aspx
152 lines (120 loc) · 4.28 KB
/
Chitietsanpham.aspx
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Chitietsanpham.aspx.cs" Inherits="oragnic.Chitietsanpham" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style>
#chitiet_sp_container {
width: 80%;
margin: 0 auto;
display: flex;
}
#chitiet_sp_container_img {
width: 50%;
margin-top: 40px;
/* float: right; */
}
#chitiet_sp_container_img img {
width: 500px;
border-radius: 30px;
}
#chitiet_sp_container_text {
margin-top: 90px;
width: 50%;
}
#chitiet_sp_container_text_name h2 {
font-size: 40pt;
margin: 0;
text-transform: uppercase;
}
#chitiet_sp_container_text_name h3 {
font-size: 25pt;
color: #98bd68;
margin-top: 30px;
}
#chitiet_sp_container_text_name p {
font-size: 15pt;
color: gray;
margin: 50px 0;
}
.cart_value button {
background: none;
border: solid 1px gray;
padding: 13px 20px;
/* font-size: 10pt; */
}
.cart_value input {
background: none;
border: solid 1px gray;
padding: 13px 20px;
text-align: center;
}
.cart_add {
margin-top: 20px;
}
.cart_add p {
margin: 10px 0;
}
.cart_add span {
background: black;
padding: 20px;
border-radius: 30px;
color: white;
}
.cart_add span i {
margin-right: 10px;
}
.cart_add span input {
border: none;
background: none;
color: white;
font-size: 15pt;
}
.cart_add span:hover {
background: #98bd68;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id='chitiet_sp'>
<div id='chitiet_sp_container'>
<div id='chitiet_sp_container_img'>
<img id="Image1" src="./" runat="server" alt='' />
</div>
<div id='chitiet_sp_container_text'>
<div id='chitiet_sp_container_text_name'>
<h2 id="namesp" runat="server"></h2>
<h3 id="salesp" runat="server"></h3>
<p id="chitiettext" runat="server"></p>
</div>
<div id='chitiet_sp_container_text_cart'>
<div>
<div class='cart_value'>
<button onclick='tru()'>-</button>
<input id="input_value" type="number" name='input_buy' value='0' runat="server" />
<button onclick='cong()'>+</button>
</div>
<div class='cart_add'>
<p>Số lượng và giá tiền được tính theo kg</p>
<div style="margin-top: 40px;">
<span>
<i class="fa-light fa-cart-plus"></i>
<asp:Button runat="server" Text="Thêm Vào Giỏ" OnClick="Buy_Click" />
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function tru() {
if (document.getElementById('<%=input_value.ClientID%>').value <= 0) {
document.getElementById('<%=input_value.ClientID%>').value = 0;
}
else document.getElementById('<%=input_value.ClientID%>').value--;
}
function cong() {
document.getElementById('<%=input_value.ClientID%>').value++;
console.log(document.getElementById('<%=input_value.ClientID%>').value);
}
</script>
</asp:Content>