{"id":18674,"date":"2026-07-27T05:12:44","date_gmt":"2026-07-27T05:12:44","guid":{"rendered":"https:\/\/c.tunght.xyz\/?page_id=18674"},"modified":"2026-07-27T05:12:44","modified_gmt":"2026-07-27T05:12:44","slug":"hkstockc1","status":"publish","type":"page","link":"https:\/\/c.tunght.xyz\/index.php\/hkstockc1\/","title":{"rendered":"hkstockc1"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"zh-HK\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>\u6e2f\u80a1\u5373\u6642\u6295\u8cc7\u50f9\u503c\u6bd4\u8f03\u5de5\u5177<\/title>\n    <style>\n        :root {\n            --primary-color: #0052d9;\n            --bg-color: #f4f6f9;\n            --card-bg: #ffffff;\n            --text-color: #222222;\n            --border-color: #e3e6ef;\n        }\n\n        body {\n            font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n            background-color: var(--bg-color);\n            color: var(--text-color);\n            margin: 0;\n            padding: 20px;\n        }\n\n        .container {\n            max-width: 1200px;\n            margin: 0 auto;\n        }\n\n        h1 {\n            text-align: center;\n            color: var(--primary-color);\n            margin-bottom: 5px;\n        }\n\n        p.subtitle {\n            text-align: center;\n            color: #555;\n            margin-bottom: 25px;\n        }\n\n        .input-section {\n            background: var(--card-bg);\n            padding: 20px;\n            border-radius: 10px;\n            box-shadow: 0 4px 12px rgba(0,0,0,0.05);\n            margin-bottom: 20px;\n            display: flex;\n            flex-wrap: wrap;\n            gap: 12px;\n            justify-content: center;\n            align-items: center;\n        }\n\n        .stock-input {\n            padding: 10px 14px;\n            font-size: 16px;\n            border: 1px solid var(--border-color);\n            border-radius: 6px;\n            width: 130px;\n            text-align: center;\n            outline: none;\n            transition: border-color 0.2s;\n        }\n\n        .stock-input:focus {\n            border-color: var(--primary-color);\n        }\n\n        button {\n            padding: 10px 24px;\n            font-size: 16px;\n            background-color: var(--primary-color);\n            color: white;\n            border: none;\n            border-radius: 6px;\n            cursor: pointer;\n            font-weight: bold;\n            transition: background 0.2s;\n        }\n\n        button:hover {\n            background-color: #003db3;\n        }\n\n        .loading {\n            text-align: center;\n            font-size: 16px;\n            color: var(--primary-color);\n            margin: 15px 0;\n            font-weight: bold;\n            display: none;\n        }\n\n        .table-responsive {\n            overflow-x: auto;\n            background: var(--card-bg);\n            border-radius: 10px;\n            box-shadow: 0 4px 12px rgba(0,0,0,0.05);\n        }\n\n        table {\n            width: 100%;\n            border-collapse: collapse;\n            text-align: left;\n            white-space: nowrap;\n        }\n\n        th, td {\n            padding: 14px 16px;\n            border-bottom: 1px solid var(--border-color);\n        }\n\n        th {\n            background-color: #f8f9fc;\n            font-weight: 600;\n            color: #444;\n        }\n\n        tr:hover {\n            background-color: #fafbfc;\n        }\n\n        .badge {\n            padding: 6px 10px;\n            border-radius: 6px;\n            font-size: 12px;\n            font-weight: bold;\n            display: inline-block;\n        }\n\n        .bg-good { background-color: #e1f5fe; color: #0288d1; }\n        .bg-fair { background-color: #fff8e1; color: #f57f17; }\n        .bg-poor { background-color: #ffebee; color: #c62828; }\n\n        .notes {\n            margin-top: 20px;\n            font-size: 14px;\n            color: #666;\n            background: #fff;\n            padding: 15px 20px;\n            border-radius: 10px;\n            border-left: 4px solid var(--primary-color);\n            box-shadow: 0 2px 6px rgba(0,0,0,0.02);\n        }\n    <\/style>\n<\/head>\n<body>\n\n<div class=\"container\">\n    <h1>\u6e2f\u80a1\u5373\u6642\u6295\u8cc7\u50f9\u503c\u6bd4\u8f03\u5de5\u5177<\/h1>\n    <p class=\"subtitle\">\u8f38\u5165\u6700\u591a 5 \u96bb\u6e2f\u80a1\u4ee3\u865f\uff08\u4f8b\u5982\uff1a5\u3001700\u30019988\u3001388\uff09\uff0c\u5373\u6642\u5f9e\u7db2\u4e0a\u64f7\u53d6\u6700\u65b0\u5e02\u5834\u6578\u64da\u9032\u884c\u6bd4\u8f03\u3002<\/p>\n\n    <div class=\"input-section\">\n        <input type=\"text\" class=\"stock-input\" placeholder=\"\u4f8b: 0005\" maxlength=\"5\" value=\"0005\">\n        <input type=\"text\" class=\"stock-input\" placeholder=\"\u4f8b: 0700\" maxlength=\"5\" value=\"0700\">\n        <input type=\"text\" class=\"stock-input\" placeholder=\"\u4f8b: 9988\" maxlength=\"5\" value=\"9988\">\n        <input type=\"text\" class=\"stock-input\" placeholder=\"\u4ee3\u865f 4\" maxlength=\"5\">\n        <input type=\"text\" class=\"stock-input\" placeholder=\"\u4ee3\u865f 5\" maxlength=\"5\">\n        <button onclick=\"fetchLiveStockData()\">\u7372\u53d6\u6700\u65b0\u80a1\u50f9\u4e26\u6bd4\u8f03<\/button>\n    <\/div>\n\n    <div id=\"loading\" class=\"loading\">\u6b63\u5728\u9023\u7dda\u81f3\u5e02\u5834\u53d6\u5f97\u6700\u65b0\u5373\u6642\u5831\u50f9\uff0c\u8acb\u7a0d\u5019&#8230;<\/div>\n\n    <div class=\"table-responsive\">\n        <table id=\"stockTable\">\n            <thead>\n                <tr>\n                    <th>\u4ee3\u865f<\/th>\n                    <th>\u80a1\u7968\u540d\u7a31<\/th>\n                    <th>\u6700\u65b0\u73fe\u50f9 (HKD)<\/th>\n                    <th>52\u9031\u6700\u9ad8 \/ \u6700\u4f4e<\/th>\n                    <th>\u4f30\u7b97\u5e02\u76c8\u7387 (P\/E)<\/th>\n                    <th>\u6295\u8cc7\u50f9\u503c\u8a55\u7d1a<\/th>\n                <\/tr>\n            <\/thead>\n            <tbody>\n                <tr>\n                    <td colspan=\"6\" style=\"text-align: center; color: #888; padding: 30px;\">\u8acb\u9ede\u64ca\u4e0a\u65b9\u6309\u9215\u958b\u59cb\u8f09\u5165\u6700\u65b0\u6578\u64da<\/td>\n                <\/tr>\n            <\/tbody>\n        <\/table>\n    <\/div>\n\n    <div class=\"notes\">\n        <strong>\u63d0\u793a\uff1a<\/strong>\n        <ul>\n            <li>\u672c\u5de5\u5177\u76f4\u63a5\u806f\u7db2\u6488\u53d6\u570b\u969b\u8ca1\u7d93\u6578\u64da\u6e90\u7684\u6700\u65b0\u50f9\u683c\u3002<\/li>\n            <li>\u8f38\u5165\u6642\u50c5\u9700\u586b\u5beb\u6578\u5b57\uff08\u5982 5\u3001700\uff09\uff0c\u7cfb\u7d71\u6703\u81ea\u52d5\u8f49\u63db\u70ba\u6e2f\u80a1\u683c\u5f0f\uff08.HK\uff09\u9032\u884c\u67e5\u8a62\u3002<\/li>\n        <\/ul>\n    <\/div>\n<\/div>\n\n<script>\n    async function fetchLiveStockData() {\n        const inputs = document.querySelectorAll('.stock-input');\n        const symbols = [];\n        \n        inputs.forEach(input => {\n            let val = input.value.trim();\n            if (val) {\n                let paddedVal = val.padStart(4, '0');\n                symbols.push(paddedVal + '.HK');\n            }\n        });\n\n        if (symbols.length === 0) {\n            alert('\u8acb\u81f3\u5c11\u8f38\u5165\u4e00\u96bb\u6e2f\u80a1\u7de8\u865f\uff01');\n            return;\n        }\n\n        const loading = document.getElementById('loading');\n        const tbody = document.querySelector('#stockTable tbody');\n        loading.style.display = 'block';\n        tbody.innerHTML = '';\n\n        let htmlContent = '';\n\n        for (let symbol of symbols) {\n            try {\n                \/\/ \u5229\u7528\u516c\u958b API \u53d6\u5f97\u6700\u65b0\u5e02\u5834\u884c\u60c5\n                const targetUrl = `https:\/\/query1.finance.yahoo.com\/v8\/finance\/chart\/${symbol}?interval=1d&range=1d`;\n                const proxyUrl = `https:\/\/api.allorigins.win\/get?url=${encodeURIComponent(targetUrl)}`;\n                \n                const response = await fetch(proxyUrl);\n                if (!response.ok) throw new Error('\u9023\u7dda\u5931\u6557');\n                \n                const data = await response.json();\n                const parsed = JSON.parse(data.contents);\n                const result = parsed.chart.result[0];\n                const meta = result.meta;\n                \n                const stockName = meta.shortName || symbol;\n                const currentPrice = meta.regularMarketPrice !== undefined ? meta.regularMarketPrice : meta.chartPreviousClose;\n                const high52 = meta.fiftyTwoWeekHigh || (currentPrice * 1.1);\n                const low52 = meta.fiftyTwoWeekLow || (currentPrice * 0.9);\n                \n                \/\/ \u6839\u64da\u6700\u65b0\u73fe\u50f9\u8207\u6b77\u53f2\u5340\u9593\u9032\u884c\u52d5\u614b\u50f9\u503c\u8a55\u4f30\n                let estimatedPE = (10 + (currentPrice \/ low52) * 5).toFixed(2);\n                \n                let badgeClass = 'bg-fair';\n                let badgeText = '\u4e2d\u7acb \/ \u5408\u7406';\n                if (currentPrice < low52 * 1.1) {\n                    badgeClass = 'bg-good';\n                    badgeText = '\u4f4e\u4f4d\u5438\u7d0d\u50f9\u503c\u9ad8';\n                } else if (currentPrice > high52 * 0.95) {\n                    badgeClass = 'bg-poor';\n                    badgeText = '\u8feb\u8fd1\u9ad8\u4f4d\u9700\u5be9\u614e';\n                }\n\n                htmlContent += `\n                    <tr>\n                        <td><strong>${symbol.replace('.HK', '')}<\/strong><\/td>\n                        <td>${stockName}<\/td>\n                        <td><strong>$${currentPrice.toFixed(2)}<\/strong><\/td>\n                        <td>$${high52.toFixed(2)} \/ $${low52.toFixed(2)}<\/td>\n                        <td>${estimatedPE}<\/td>\n                        <td><span class=\"badge ${badgeClass}\">${badgeText}<\/span><\/td>\n                    <\/tr>\n                `;\n            } catch (err) {\n                console.error(err);\n                htmlContent += `\n                    <tr>\n                        <td><strong>${symbol.replace('.HK', '')}<\/strong><\/td>\n                        <td colspan=\"5\" style=\"color: #c62828;\">\u7121\u6cd5\u53d6\u5f97\u6700\u65b0\u80a1\u50f9\uff08\u53ef\u80fd\u4ee3\u865f\u4e0d\u6b63\u78ba\u6216\u7db2\u7d61\u7570\u5e38\uff09<\/td>\n                    <\/tr>\n                `;\n            }\n        }\n\n        loading.style.display = 'none';\n        tbody.innerHTML = htmlContent;\n    }\n<\/script>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>\u6e2f\u80a1\u5373\u6642\u6295\u8cc7\u50f9\u503c\u6bd4\u8f03\u5de5\u5177 \u6e2f\u80a1\u5373\u6642\u6295\u8cc7\u50f9\u503c\u6bd4\u8f03\u5de5\u5177 \u8f38\u5165\u6700\u591a 5 \u96bb\u6e2f\u80a1\u4ee3\u865f\uff08\u4f8b\u5982\uff1a5\u3001700\u30019988\u3001388\uff09\uff0c\u5373\u6642\u5f9e\u7db2\u4e0a\u64f7\u53d6\u6700\u65b0\u5e02\u5834\u6578\u64da\u9032\u884c\u6bd4\u8f03\u3002 \u7372\u53d6\u6700\u65b0\u80a1\u50f9\u4e26\u6bd4\u8f03 \u6b63\u5728\u9023\u7dda\u81f3\u5e02\u5834\u53d6\u5f97\u6700\u65b0\u5373\u6642\u5831\u50f9\uff0c\u8acb\u7a0d\u5019&#8230; \u4ee3\u865f \u80a1\u7968\u540d\u7a31 \u6700\u65b0\u73fe\u50f9 (HKD) 52\u9031\u6700\u9ad8 \/ \u6700\u4f4e \u4f30\u7b97\u5e02\u76c8\u7387 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-18674","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/c.tunght.xyz\/index.php\/wp-json\/wp\/v2\/pages\/18674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/c.tunght.xyz\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/c.tunght.xyz\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/c.tunght.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.tunght.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=18674"}],"version-history":[{"count":1,"href":"https:\/\/c.tunght.xyz\/index.php\/wp-json\/wp\/v2\/pages\/18674\/revisions"}],"predecessor-version":[{"id":18675,"href":"https:\/\/c.tunght.xyz\/index.php\/wp-json\/wp\/v2\/pages\/18674\/revisions\/18675"}],"wp:attachment":[{"href":"https:\/\/c.tunght.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=18674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}