务必通过WebVPN访问本页面,直连访问将无法获取twfid

http://juiceright-github-io-s.webvpn.stu.edu.cn:8118/post/lGBTFf1szi/



以下是源码,该工具仅在本地处理,不会上传任何数据。

    <button onclick="checkTwfidCookie()">查看 twfid Cookie 值</button>
    <p id="result"></p>
    <script>
        function checkTwfidCookie() {
            const cookies = document.cookie.split('; ');
            for (let i = 0; i < cookies.length; i++) {
                const parts = cookies[i].split('=');
                if (parts[0] === 'TWFID') {
                    document.getElementById('result').textContent = 'TWFID Cookie 的值为: ' + parts[1];
                    return;
                }
            }
            document.getElementById('result').textContent = '未找到 TWFID Cookie。';
        }
    </script>