{Javascript} Cookies-Trickcode

{Javascript} Cookies
Share it:

{Javascript} Cookies-Trickcode


{Javascript} Cookies-Trickcode
google

Javascript Cookies


In these articles, here I am placing a Method for finding Javascript Cookies

for example, if we want to know which control causes the Javascript Cookies on the page. you simply use this code.

<script type=”text/javascript“>
        function createCookie() {
            document.cookie = “CookieName=CookieValue;” + “expires=Sat, 16 May 2020 18:40:22 GMT”;
        }
        function getCookieValue(key) {
            currentcookie = document.cookie;
            if (currentcookie.length > 0) {
                firstidx = currentcookie.indexOf(key + “=”);
                if (firstidx != -1) {
                    firstidx = firstidx + key.length + 1;
                    lastidx = currentcookie.indexOf(“;”, firstidx);
                    if (lastidx == -1) {
                        lastidx = currentcookie.length;
                    }
                    return unescape(currentcookie.substring(firstidx, lastidx));
                }
            }
            return “”;
        }
    </script>


Do you know:-


If you like the tutorial, then please share this tutorial with your friends on social media.
Share it:

javascript

Post A Comment:

6 comments:

  1. I wan’t going to comment as this posts a bit old now, but just wanted to say thanks. ny web design firms

    ReplyDelete
  2. I am crazy about this blog. I have visit so many time to this blog. I was found this blog from Google. I have received a nice stuff of information. I really appreciate to meet to it and i emphasize to this blog. My curiosity to learn more and more on this blog. web design agency new york

    ReplyDelete
  3. I am curious to find out what blog platform you are using? I’m having some minor security problems with my latest website and I’d like to find something more risk-free. Do you have any solutions? branding firms san francisco

    ReplyDelete
  4. just couldn’t leave your web site before suggesting that I really loved the standard information a person provide for your visitors? Is gonna be again ceaselessly to check up on new posts san fran design firms

    ReplyDelete
  5. I have to convey my respect for your kindness for all those that require guidance on this one field. Your special commitment to passing the solution up and down has been incredibly functional and has continually empowered most people just like me to achieve their dreams. Your amazing insightful information entails much to me and especially to my peers. Thanks a ton; from all of us. iphone psd

    ReplyDelete
  6. soem sites that offer download games have viruses and spywares on it. so make sure to have some antivirus on your PC’ la web design

    ReplyDelete