Tag: cookies

Change Font Size with JavaScript

Here is the javascript code to increase or decrease the font size on the fly, you can give control to the user to change the text size for better readability. function resizeFont(multiply) { var sz = document.body.style.fontSize; if (sz =='') sz = 14; //default font size var size = parseFloat(sz) + (multiply * 0.2) +

Create, Read and Delete Cookies with JavaScript

In this tutorial, I am going to give a JavaScript code samples to create, read and delete the cookies. Setting a Cookie function SetCookie(name,value,days) { var now= new Date(); var expDate = new Date(); if (days==null || days==0) days=1; //create date after no of "days" from now expDate.setTime(now.getTime() + 3600000*24*days); //create cookie with name, value
Close Bitnami banner