meituan-checkout-demo.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. <!DOCTYPE html>
  2. <html lang="zh-TW">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  6. <title>美團外賣 - 結算頁優惠券選擇 Demo</title>
  7. <style>
  8. * { margin: 0; padding: 0; box-sizing: border-box; }
  9. body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif; background: #f5f5f5; color: #333; }
  10. .phone-frame {
  11. width: 375px; height: 812px; margin: 20px auto;
  12. border: 3px solid #333; border-radius: 40px; overflow: hidden;
  13. background: #f5f5f5; position: relative;
  14. box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  15. }
  16. /* Header */
  17. .header {
  18. background: linear-gradient(135deg, #FFD100, #FFB800);
  19. padding: 44px 16px 12px; position: sticky; top: 0; z-index: 10;
  20. }
  21. .header h1 { font-size: 18px; font-weight: 600; text-align: center; }
  22. /* Scrollable content */
  23. .content { height: calc(812px - 56px - 60px); overflow-y: auto; padding-bottom: 20px; }
  24. /* Section card */
  25. .card {
  26. background: #fff; margin: 10px 12px; border-radius: 12px;
  27. padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  28. }
  29. /* Address */
  30. .address-section { display: flex; align-items: center; gap: 10px; }
  31. .address-icon { font-size: 22px; }
  32. .address-info { flex: 1; }
  33. .address-name { font-size: 15px; font-weight: 600; }
  34. .address-name span { font-weight: 400; color: #999; margin-left: 8px; font-size: 13px; }
  35. .address-detail { font-size: 13px; color: #666; margin-top: 2px; }
  36. .address-arrow { color: #ccc; font-size: 16px; }
  37. /* Items */
  38. .section-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: #333; }
  39. .merchant-tag {
  40. display: inline-block; background: #FFF3E0; color: #FF8C00;
  41. font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-left: 8px; font-weight: 400;
  42. }
  43. .order-item {
  44. display: flex; justify-content: space-between; align-items: center;
  45. padding: 8px 0; border-bottom: 1px solid #f5f5f5;
  46. }
  47. .order-item:last-child { border-bottom: none; }
  48. .item-name { font-size: 14px; color: #333; }
  49. .item-name .qty { color: #999; margin-left: 4px; font-size: 12px; }
  50. .item-price { font-size: 14px; color: #333; }
  51. .subtotal-row { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px dashed #eee; margin-top: 4px; }
  52. .subtotal-label { font-size: 14px; color: #666; }
  53. .subtotal-amount { font-size: 15px; font-weight: 600; }
  54. /* Discount section */
  55. .discount-item {
  56. display: flex; justify-content: space-between; align-items: center;
  57. padding: 10px 0; border-bottom: 1px solid #f8f8f8;
  58. }
  59. .discount-item:last-child { border-bottom: none; }
  60. .discount-left { display: flex; align-items: center; gap: 8px; flex: 1; }
  61. .discount-label { font-size: 14px; color: #333; }
  62. .discount-tag {
  63. font-size: 10px; padding: 1px 5px; border-radius: 3px; font-weight: 500;
  64. }
  65. .tag-auto { background: #E8F5E9; color: #4CAF50; }
  66. .tag-merchant { background: #FFF3E0; color: #FF8C00; }
  67. .tag-platform { background: #E3F2FD; color: #1E88E5; }
  68. .discount-amount { font-size: 14px; color: #FF5722; font-weight: 500; }
  69. .discount-select {
  70. display: flex; align-items: center; gap: 4px;
  71. font-size: 13px; color: #999; cursor: pointer;
  72. }
  73. .discount-select .arrow { font-size: 14px; transition: transform 0.2s; }
  74. /* Fee rows */
  75. .fee-row {
  76. display: flex; justify-content: space-between; padding: 6px 0;
  77. font-size: 13px; color: #999;
  78. }
  79. /* Total bar */
  80. .total-bar {
  81. display: flex; justify-content: space-between; align-items: center;
  82. padding-top: 12px; border-top: 1px solid #eee; margin-top: 4px;
  83. }
  84. .saved-amount { font-size: 13px; color: #FF5722; }
  85. .total-amount { font-size: 20px; font-weight: 700; color: #333; }
  86. .total-amount span { font-size: 13px; color: #999; margin-right: 4px; }
  87. /* Misc options */
  88. .misc-item {
  89. display: flex; justify-content: space-between; align-items: center;
  90. padding: 10px 0; border-bottom: 1px solid #f5f5f5;
  91. }
  92. .misc-item:last-child { border-bottom: none; }
  93. .misc-label { font-size: 14px; color: #333; }
  94. .misc-value { font-size: 13px; color: #999; display: flex; align-items: center; gap: 4px; }
  95. /* Submit button */
  96. .submit-bar {
  97. position: absolute; bottom: 0; left: 0; right: 0;
  98. background: #fff; padding: 10px 16px 28px;
  99. border-top: 1px solid #eee; display: flex; align-items: center; justify-content: space-between;
  100. }
  101. .submit-info { font-size: 13px; color: #999; }
  102. .submit-info .price { font-size: 22px; color: #FF5722; font-weight: 700; }
  103. .submit-btn {
  104. background: linear-gradient(135deg, #FFD100, #FFB800); border: none;
  105. padding: 12px 32px; border-radius: 24px; font-size: 16px;
  106. font-weight: 600; color: #333; cursor: pointer;
  107. }
  108. .submit-btn:hover { filter: brightness(1.05); }
  109. /* Bottom Sheet Overlay */
  110. .sheet-overlay {
  111. position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  112. background: rgba(0,0,0,0.5); z-index: 100;
  113. opacity: 0; pointer-events: none; transition: opacity 0.3s;
  114. }
  115. .sheet-overlay.active { opacity: 1; pointer-events: auto; }
  116. /* Bottom Sheet */
  117. .bottom-sheet {
  118. position: absolute; bottom: 0; left: 0; right: 0;
  119. background: #fff; border-radius: 16px 16px 0 0;
  120. z-index: 101; transform: translateY(100%);
  121. transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  122. max-height: 70%;
  123. }
  124. .bottom-sheet.active { transform: translateY(0); }
  125. .sheet-header {
  126. display: flex; justify-content: space-between; align-items: center;
  127. padding: 16px 20px; border-bottom: 1px solid #f0f0f0;
  128. position: sticky; top: 0; background: #fff; z-index: 1;
  129. }
  130. .sheet-title { font-size: 16px; font-weight: 600; }
  131. .sheet-close {
  132. width: 28px; height: 28px; border-radius: 50%; background: #f0f0f0;
  133. display: flex; align-items: center; justify-content: center;
  134. font-size: 16px; color: #999; cursor: pointer; border: none;
  135. }
  136. .sheet-body { overflow-y: auto; max-height: calc(70vh - 56px); padding: 12px 16px 28px; }
  137. /* Coupon card */
  138. .coupon-card {
  139. display: flex; border-radius: 10px; margin-bottom: 10px;
  140. overflow: hidden; cursor: pointer; border: 2px solid transparent;
  141. transition: border-color 0.2s, opacity 0.2s;
  142. position: relative;
  143. }
  144. .coupon-card.selected { border-color: #FF5722; }
  145. .coupon-card.disabled { opacity: 0.5; cursor: not-allowed; }
  146. .coupon-amount-side {
  147. width: 90px; display: flex; flex-direction: column;
  148. align-items: center; justify-content: center;
  149. padding: 12px 8px; color: #fff;
  150. }
  151. .coupon-amount-side.merchant { background: linear-gradient(135deg, #FF8C00, #FF6D00); }
  152. .coupon-amount-side.platform { background: linear-gradient(135deg, #1E88E5, #1565C0); }
  153. .coupon-amount-side.disabled-bg { background: #bbb !important; }
  154. .coupon-symbol { font-size: 12px; }
  155. .coupon-value { font-size: 28px; font-weight: 700; line-height: 1.1; }
  156. .coupon-condition { font-size: 10px; margin-top: 2px; opacity: 0.9; }
  157. .coupon-info-side {
  158. flex: 1; padding: 10px 14px; background: #fff;
  159. display: flex; flex-direction: column; justify-content: center;
  160. }
  161. .coupon-name { font-size: 14px; font-weight: 600; color: #333; }
  162. .coupon-desc { font-size: 12px; color: #999; margin-top: 3px; }
  163. .coupon-expire { font-size: 11px; color: #bbb; margin-top: 3px; }
  164. .coupon-reason { font-size: 11px; color: #FF5722; margin-top: 3px; }
  165. .coupon-check {
  166. position: absolute; top: 10px; right: 10px;
  167. width: 22px; height: 22px; border-radius: 50%;
  168. display: flex; align-items: center; justify-content: center;
  169. }
  170. .coupon-check.checked { background: #FF5722; color: #fff; }
  171. .coupon-check.unchecked { border: 1.5px solid #ddd; }
  172. .sheet-divider {
  173. text-align: center; color: #ccc; font-size: 12px;
  174. padding: 10px 0; position: relative;
  175. }
  176. .sheet-divider::before, .sheet-divider::after {
  177. content: ''; position: absolute; top: 50%; width: 30%;
  178. border-top: 1px solid #eee;
  179. }
  180. .sheet-divider::before { left: 0; }
  181. .sheet-divider::after { right: 0; }
  182. /* Tabs in sheet */
  183. .sheet-tabs {
  184. display: flex; border-bottom: 1px solid #f0f0f0; margin-bottom: 4px;
  185. }
  186. .sheet-tab {
  187. flex: 1; text-align: center; padding: 10px; font-size: 14px;
  188. color: #999; cursor: pointer; position: relative;
  189. }
  190. .sheet-tab.active { color: #333; font-weight: 600; }
  191. .sheet-tab.active::after {
  192. content: ''; position: absolute; bottom: 0; left: 30%; right: 30%;
  193. height: 3px; background: #FF5722; border-radius: 2px;
  194. }
  195. .sheet-tab .badge {
  196. display: inline-block; background: #FF5722; color: #fff;
  197. font-size: 10px; padding: 0 5px; border-radius: 8px;
  198. margin-left: 2px; vertical-align: top;
  199. }
  200. /* Realtime update flash */
  201. .flash { animation: flashHighlight 0.6s ease; }
  202. @keyframes flashHighlight {
  203. 0% { background: #FFF8E1; }
  204. 100% { background: transparent; }
  205. }
  206. /* Responsive */
  207. @media (max-width: 400px) {
  208. .phone-frame { width: 100%; height: 100vh; border: none; border-radius: 0; margin: 0; }
  209. .content { height: calc(100vh - 56px - 60px); }
  210. }
  211. </style>
  212. </head>
  213. <body>
  214. <div class="phone-frame">
  215. <div class="header">
  216. <h1>提交訂單</h1>
  217. </div>
  218. <div class="content">
  219. <!-- Address -->
  220. <div class="card">
  221. <div class="address-section">
  222. <div class="address-icon">📍</div>
  223. <div class="address-info">
  224. <div class="address-name">張先生<span>138****8888</span></div>
  225. <div class="address-detail">台北市中山區南京東路一段120號3樓</div>
  226. </div>
  227. <div class="address-arrow">›</div>
  228. </div>
  229. </div>
  230. <!-- Delivery time -->
  231. <div class="card" style="padding: 12px 16px;">
  232. <div style="display:flex; justify-content:space-between; align-items:center;">
  233. <span style="font-size:14px;">🕐 盡快送達(約25-35分鐘)</span>
  234. <span style="font-size:13px; color:#999;">›</span>
  235. </div>
  236. </div>
  237. <!-- Order items -->
  238. <div class="card">
  239. <div class="section-title">
  240. 好吃便當店
  241. <span class="merchant-tag">品牌</span>
  242. </div>
  243. <div class="order-item">
  244. <span class="item-name">招牌排骨便當<span class="qty">×1</span></span>
  245. <span class="item-price">¥85</span>
  246. </div>
  247. <div class="order-item">
  248. <span class="item-name">珍珠奶茶<span class="qty">×2</span></span>
  249. <span class="item-price">¥60</span>
  250. </div>
  251. <div class="subtotal-row">
  252. <span class="subtotal-label">小計</span>
  253. <span class="subtotal-amount">¥145</span>
  254. </div>
  255. </div>
  256. <!-- Discounts -->
  257. <div class="card" id="discountCard">
  258. <div class="section-title">優惠明細</div>
  259. <!-- 商家滿減 (auto) -->
  260. <div class="discount-item">
  261. <div class="discount-left">
  262. <span class="discount-label">商家滿減</span>
  263. <span class="discount-tag tag-auto">自動</span>
  264. </div>
  265. <span class="discount-amount" id="merchantPromo">-¥20</span>
  266. </div>
  267. <!-- 商家優惠券 (selectable) -->
  268. <div class="discount-item" id="merchantCouponRow" onclick="openSheet('merchant')">
  269. <div class="discount-left">
  270. <span class="discount-label">商家優惠券</span>
  271. <span class="discount-tag tag-merchant">選1張</span>
  272. </div>
  273. <div class="discount-select">
  274. <span class="discount-amount" id="merchantCouponAmount">-¥15</span>
  275. <span class="arrow">›</span>
  276. </div>
  277. </div>
  278. <!-- 平台紅包 (selectable) -->
  279. <div class="discount-item" id="platformCouponRow" onclick="openSheet('platform')">
  280. <div class="discount-left">
  281. <span class="discount-label">平台紅包</span>
  282. <span class="discount-tag tag-platform">選1張</span>
  283. </div>
  284. <div class="discount-select">
  285. <span class="discount-amount" id="platformCouponAmount">-¥18</span>
  286. <span class="arrow">›</span>
  287. </div>
  288. </div>
  289. <div style="height: 4px;"></div>
  290. <div class="fee-row">
  291. <span>配送費</span><span>¥15</span>
  292. </div>
  293. <div class="fee-row">
  294. <span>包裝費</span><span>¥5</span>
  295. </div>
  296. </div>
  297. <!-- Misc -->
  298. <div class="card">
  299. <div class="misc-item">
  300. <span class="misc-label">📝 備註</span>
  301. <span class="misc-value">口味偏好等<span>›</span></span>
  302. </div>
  303. <div class="misc-item">
  304. <span class="misc-label">🥢 餐具</span>
  305. <span class="misc-value">1份<span>›</span></span>
  306. </div>
  307. <div class="misc-item">
  308. <span class="misc-label">🧾 發票</span>
  309. <span class="misc-value">不需要<span>›</span></span>
  310. </div>
  311. </div>
  312. <!-- Total -->
  313. <div class="card" id="totalCard">
  314. <div class="total-bar">
  315. <span class="saved-amount">已優惠 ¥53</span>
  316. <div>
  317. <span class="total-amount"><span>實付</span>¥112</span>
  318. </div>
  319. </div>
  320. </div>
  321. </div>
  322. <!-- Submit bar -->
  323. <div class="submit-bar">
  324. <div class="submit-info">
  325. <span>實付 </span><span class="price" id="submitPrice">¥112</span>
  326. </div>
  327. <button class="submit-btn">提交訂單</button>
  328. </div>
  329. <!-- Overlay -->
  330. <div class="sheet-overlay" id="sheetOverlay" onclick="closeSheet()"></div>
  331. <!-- Merchant coupon sheet -->
  332. <div class="bottom-sheet" id="merchantSheet">
  333. <div class="sheet-header">
  334. <span class="sheet-title">商家優惠券</span>
  335. <button class="sheet-close" onclick="closeSheet()">✕</button>
  336. </div>
  337. <div class="sheet-tabs">
  338. <div class="sheet-tab active">可用<span class="badge">3</span></div>
  339. <div class="sheet-tab">不可用<span class="badge">1</span></div>
  340. </div>
  341. <div class="sheet-body" id="merchantSheetBody"></div>
  342. </div>
  343. <!-- Platform coupon sheet -->
  344. <div class="bottom-sheet" id="platformSheet">
  345. <div class="sheet-header">
  346. <span class="sheet-title">平台紅包</span>
  347. <button class="sheet-close" onclick="closeSheet()">✕</button>
  348. </div>
  349. <div class="sheet-tabs">
  350. <div class="sheet-tab active">可用<span class="badge">3</span></div>
  351. <div class="sheet-tab">不可用<span class="badge">1</span></div>
  352. </div>
  353. <div class="sheet-body" id="platformSheetBody"></div>
  354. </div>
  355. </div>
  356. <script>
  357. const subtotal = 145;
  358. const deliveryFee = 15;
  359. const packageFee = 5;
  360. const merchantPromo = 20; // fixed auto
  361. // Available merchant coupons
  362. const merchantCoupons = [
  363. { id: 'm1', name: '滿減券', desc: '全店通用', condition: '滿100元可用', threshold: 100, amount: 15, expire: '2026-06-30', usable: true },
  364. { id: 'm2', name: '滿減券', desc: '全店通用', condition: '滿80元可用', threshold: 80, amount: 10, expire: '2026-06-15', usable: true },
  365. { id: 'm3', name: '折扣券', desc: '限奶茶類', condition: '滿50元可用', threshold: 50, amount: 5, expire: '2026-06-20', usable: true },
  366. { id: 'm4', name: '滿減券', desc: '全店通用', condition: '滿200元可用', threshold: 200, amount: 40, expire: '2026-06-25', usable: false, reason: '訂單不滿200元,無法使用' },
  367. ];
  368. // Available platform coupons
  369. const platformCoupons = [
  370. { id: 'p1', name: '天天神券', desc: '全場通用', condition: '滿50元可用', threshold: 50, amount: 18, expire: '2026-06-28', usable: true },
  371. { id: 'p2', name: '會員專享券', desc: '全場通用', condition: '滿100元可用', threshold: 100, amount: 25, expire: '2026-06-30', usable: true },
  372. { id: 'p3', name: '新人紅包', desc: '全場通用', condition: '滿30元可用', threshold: 30, amount: 5, expire: '2026-06-22', usable: true },
  373. { id: 'p4', name: '神會員券', desc: '全場通用', condition: '滿50元可用', threshold: 50, amount: 15, expire: '2026-07-01', usable: false, reason: '需開通神會員' },
  374. ];
  375. let selectedMerchant = 'm1';
  376. let selectedPlatform = 'p1';
  377. function getDiscountedSubtotal() {
  378. return subtotal - merchantPromo;
  379. }
  380. function calcTotal() {
  381. const mc = merchantCoupons.find(c => c.id === selectedMerchant);
  382. const pc = platformCoupons.find(c => c.id === selectedPlatform);
  383. const mcAmt = mc ? mc.amount : 0;
  384. const pcAmt = pc ? pc.amount : 0;
  385. const totalSaved = merchantPromo + mcAmt + pcAmt;
  386. const total = subtotal - totalSaved + deliveryFee + packageFee;
  387. return { mcAmt, pcAmt, totalSaved, total };
  388. }
  389. function updateUI() {
  390. const { mcAmt, pcAmt, totalSaved, total } = calcTotal();
  391. document.getElementById('merchantCouponAmount').textContent = mcAmt ? `-¥${mcAmt}` : '未選擇';
  392. document.getElementById('platformCouponAmount').textContent = pcAmt ? `-¥${pcAmt}` : '未選擇';
  393. const totalCard = document.getElementById('totalCard');
  394. totalCard.innerHTML = `<div class="total-bar">
  395. <span class="saved-amount">已優惠 ¥${totalSaved}</span>
  396. <div><span class="total-amount"><span>實付</span>¥${total}</span></div>
  397. </div>`;
  398. document.getElementById('submitPrice').textContent = `¥${total}`;
  399. // Flash effect
  400. totalCard.classList.remove('flash');
  401. void totalCard.offsetWidth;
  402. totalCard.classList.add('flash');
  403. }
  404. function renderCoupons(coupons, selectedId, type) {
  405. const bodyId = type === 'merchant' ? 'merchantSheetBody' : 'platformSheetBody';
  406. const body = document.getElementById(bodyId);
  407. const usable = coupons.filter(c => c.usable);
  408. const unusable = coupons.filter(c => !c.usable);
  409. let html = '';
  410. usable.forEach(c => {
  411. const sel = c.id === selectedId;
  412. const sideClass = type === 'merchant' ? 'merchant' : 'platform';
  413. html += `
  414. <div class="coupon-card ${sel ? 'selected' : ''}" onclick="selectCoupon('${type}', '${c.id}')">
  415. <div class="coupon-amount-side ${sideClass}">
  416. <span class="coupon-symbol">¥</span>
  417. <span class="coupon-value">${c.amount}</span>
  418. <span class="coupon-condition">${c.condition}</span>
  419. </div>
  420. <div class="coupon-info-side">
  421. <div class="coupon-name">${c.name}</div>
  422. <div class="coupon-desc">${c.desc}</div>
  423. <div class="coupon-expire">有效期至 ${c.expire}</div>
  424. </div>
  425. <div class="coupon-check ${sel ? 'checked' : 'unchecked'}">${sel ? '✓' : ''}</div>
  426. </div>`;
  427. });
  428. if (unusable.length > 0) {
  429. html += `<div class="sheet-divider">不可用</div>`;
  430. unusable.forEach(c => {
  431. html += `
  432. <div class="coupon-card disabled">
  433. <div class="coupon-amount-side disabled-bg">
  434. <span class="coupon-symbol">¥</span>
  435. <span class="coupon-value">${c.amount}</span>
  436. <span class="coupon-condition">${c.condition}</span>
  437. </div>
  438. <div class="coupon-info-side">
  439. <div class="coupon-name">${c.name}</div>
  440. <div class="coupon-desc">${c.desc}</div>
  441. <div class="coupon-reason">${c.reason}</div>
  442. </div>
  443. </div>`;
  444. });
  445. }
  446. body.innerHTML = html;
  447. }
  448. function selectCoupon(type, id) {
  449. if (type === 'merchant') {
  450. selectedMerchant = selectedMerchant === id ? null : id;
  451. renderCoupons(merchantCoupons, selectedMerchant, 'merchant');
  452. } else {
  453. selectedPlatform = selectedPlatform === id ? null : id;
  454. renderCoupons(platformCoupons, selectedPlatform, 'platform');
  455. }
  456. updateUI();
  457. }
  458. function openSheet(type) {
  459. const overlay = document.getElementById('sheetOverlay');
  460. overlay.classList.add('active');
  461. if (type === 'merchant') {
  462. const sheet = document.getElementById('merchantSheet');
  463. sheet.classList.add('active');
  464. renderCoupons(merchantCoupons, selectedMerchant, 'merchant');
  465. } else {
  466. const sheet = document.getElementById('platformSheet');
  467. sheet.classList.add('active');
  468. renderCoupons(platformCoupons, selectedPlatform, 'platform');
  469. }
  470. }
  471. function closeSheet() {
  472. document.getElementById('sheetOverlay').classList.remove('active');
  473. document.getElementById('merchantSheet').classList.remove('active');
  474. document.getElementById('platformSheet').classList.remove('active');
  475. }
  476. // Init
  477. updateUI();
  478. </script>
  479. </body>
  480. </html>