PDPA | ต.ย. TOT cookie | รหัสต้นฉบับ TOT cookie | CSS & JQuery | CSS ภายใน | JS & Banner |
ต.ย. ข้อมูล cookie ของท่าน ที่ระบบขอใช้ เพื่อพัฒนาบริการ Cookie named 'p4' is not set!
ตัวอย่างการใช้งาน cookie
เพื่อพัฒนาบริการให้มีประสิทธิภาพ โปรดคลิ๊กตามลิงค์ด้านล่างนี้
1. รหัสต้นฉบับทั้งหมด เพื่อสร้าง banner ขอความยินยอม : (เชิญคลิ๊กครับ)
2. การเรียนใช้ external css และ jquery (เชิญคลิ๊กครับ)
3. รหัสต้นฉบับ เฉพาะส่วนของ CSS (เชิญคลิ๊กครับ)
4. ส่วนของ javascript และ banner (เชิญคลิ๊กครับ)
ส่วนของ javascript และ banner
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
<body>
 
<!-- เนื้อหา -->
 
<script src="https://www.tot.co.th/js/vendors/jquery-3.2.0.min.js" type="text/javascript"></script>
<div>
    <div class="cookiealert" role="alert">
        <div class="container">
            <div class="hd_title white txt-cookies-head ly-head">
                <strong>"ยอมรับคุกกี้"</strong>
                <br class="visible-xss" />เพื่อให้เว็บไซต์นำเสนอ
                <br class="visible-xss" />ประสบการณ์ที่ดีขึ้นสำหรับคุณ
            </div>
            <div class="txt_content3 txt-cookies black ly-txt">
                บริษัทใช้คุกกี้ (Cookies) เพื่อเพิ่มประสบการณ์ และความพึงพอใจของท่าน เพื่อให้เว็บไซต์สามารถใช้งานได้ง่าย และมีประสิทธิภาพยิ่งขึ้น โดยการเข้าใช้เว็บไซต์นี้ถือว่าท่านได้อนุญาตให้เราใช้คุกกี้ตาม นโยบายคุกกี้ของบริษัท
                <a href="https://www.tot.co.th/cookie-policy" target="_blank">อ่านเพิ่มเติม</a>
            </div>
            <div class="btn-block-cookie"><a class="btn_main black cookieaccepted" href="javascript:void(0);">
                <img class="icon-imgcorrect" src="https://www.tot.co.th/images/default-source/default-album/cookie/btn-accept-cookies-arrow.png" /><span>ยอมรับคุกกี้</span></a>
            </div>
        </div>
        <div class="cookiealert-img-desktop"><img src="https://www.tot.co.th/images/default-source/default-album/cookie/cookies-desktop.png" /></div>
        <div class="cookiealert-img-mobile"><img src="https://www.tot.co.th/images/default-source/default-album/cookie/cookies-mobile.png" /></div>
    </div>
</div>
<script type="text/javascript">
//cookie
$(document).ready(function(){
    if(localStorage.getItem("AcceptCookie") == null){
        $('.cookiealert').addClass('show');
    }else{
        $('.cookiealert').removeClass('show');
    }           
    $('.cookieaccepted').click(function(){
        localStorage.setItem("AcceptCookie", "yes");
        $('.cookiealert').removeClass('show');
    });
});
//end cookie
</script>
</body></html>
Thaiall.com