Tuesday, October 19, 2021

Setting Cookie with javaScript and reading

 <!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>

</title>

</head>

<body>

       <script type="text/javascript">

        document.cookie = "name=autl";

        document.cookie = "course=bca";

        document.cookie = "age=21";

        console.log(document.cookie);


        var x = document.cookie;

        var y = x.split(";");

        console.log(y);


        y.map(function(args) {

        t = args.split("=");

        console.log(t);

        })

       </script>

</body>

</html>

No comments:

Post a Comment

Priority queue deleting elements after ascending inputs Gaand Fadd

 using namespace std; #include<iostream> #define N 5 class pq { public:     int* arr;     int front;     int rear;     pq() {         ...