JQUERY create cookie jquery - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

create cookie jquery


 3883

Show ResultJQUERY


12

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
</head>
<body>

<input type="text" id="input1" placeholder="put some text"></br>
<button class="btn1">create cookies</button></br>
<button class="btn2">remove cookies</button>

<script>
$(document).ready(function () {

if (typeof $.cookie('net_raft_c') === 'undefined') {
} else {
$("#input1").val($.cookie("net_raft_c"));
}

$(".btn1").click(function () {
$.cookie('net_raft_c',"" + $("#input1").val() + "", { expires: 365, path: '/' });
});

$(".btn2").click(function () {
$.removeCookie('net_raft_c', { path: '/' });
});

});
</script>

</body>
</html>


By        
The power of the user (%)
80%



The most helpful JQUERY solutions

plugin get client ip address using jqueryplugin get client ip address using jqueryJQUERY

Click to see more ...

  10.8K     1.8K

How to get client machine name or computer name with jquery?How to get client machine name or computer name with jquery?JQUERY

Click to see more ...

  16.1K     793

plugin detect country jqueryplugin detect country jqueryJQUERY

Click to see more ...

  5.8K     772

cookie jquerycookie jqueryJQUERY

Click to see more ...

  3.9K     398

plugin convert thousands to K jqueryplugin convert thousands to K jqueryJQUERY

Click to see more ...

  3.4K     402

show position on google map jqueryshow position on google map jqueryJQUERY

Click to see more ...

  2.7K     389

how to create a jquery plugin for converting date to days ago, month ago and year ago ?how to create a jquery plugin for converting date to days ago, month ago and year ago ?JQUERY

Click to see more ...

  2.8K     349

How to detect the version of IE browser using jquery ?How to detect the version of IE browser using jquery ?JQUERY

Click to see more ...

  2.7K     338

How to get top, right, left, bottom position of element div using jquery ?How to get top, right, left, bottom position of element div using jquery ?JQUERY

Click to see more ...

  2.9K     296

how to get ip address using jquery ?how to get ip address using jquery ?JQUERY

Click to see more ...

  2.5K     286

Welcome aboard!
We are happy you are here and
wish you good net-raft!