answersLogoWhite

0

Inside your Javascript (wherever is appropriate)

//First get an expires date...

var today = new Date(); //right now.

var expires = new Date();

//These are the values the cookies gonna end up with

var cookieName = 'nameOfTheCookie';

var cookieValue = 'Value';

var nDays = 1; //or whatever number of days you want the cookie to live for

expires.setTime(today.getTime() + 3600000*24*nDays);

document.cookie = cookieName+' = '+cookieValue+'; expires='+expires.toGMTString()+'; path=/';

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

How can you compile or run the JavaScript programming?

JavaScript programs cannot be compiled, but it is easy to run them if you embed them into a HTML file, and open it in your browser. Note: If you want a example, select menu-command View/Source and search for '<script'


Where do you go to download java script?

You need not download javascript. Any machine where you have a web browser like Internet Explorer or Mozilla would have javascript inbuilt in them. If you view the source (Right click-> View Source : and you can even try on this page itself), you will see tags such as <script type="text/javascript"> These is the embedded javascript code. If you have a source too in the script tag, simply locate the address and type it out in your browser, you will have the entire javascript file.


Mozilla JavaScript Debugger and Microsoft Script Debugger?

Try an add on called firebug in firefox. It works great with javascript. IE has its own built-in web development tools which works fine in my view.


What are the disadvantages of Command-line interface?

You can not view images with a command line interface.There are no graphics -drag0nhunter1


How do you create a java script?

Press f12 then go and have a look around the scripting or you can right click and go to inspect element which will probably make it go quickier. Firebug is awesome tool, Here is the javascript trick for you to edit the page displayed. javascript:document.body.contentEditable='true'; document.designMode='on'; void 0 just copy and paste this script to your Url box and press enter. Now edit anything you want.

Related Questions

How can you compile or run the JavaScript programming?

JavaScript programs cannot be compiled, but it is easy to run them if you embed them into a HTML file, and open it in your browser. Note: If you want a example, select menu-command View/Source and search for '<script'


How can I use MATLAB to view a specific value in a sparse matrix?

To view a specific value in a sparse matrix using MATLAB, you can use the command full(matrix(row, column)) where matrix is your sparse matrix and row and column are the indices of the value you want to view. This command converts the sparse matrix to a full matrix and allows you to access the specific value at the given row and column.


What is the meaning of dipendent variable?

I hope this helps you out a lot. If you are asking what a dependent variable is, here is your answer: A dependent variable is a variable which would be the output of the experiment. The value of the dependent variable depends on the value of the independent variable. If you are asking what a dependent variable does, here is your answer: A dependent variable shows you the output of the experiment. It shows you the independent variable's function. If you have learned that in Math, you should understand. Source(s): I'm a Science and Math whiz.


What command would you issue from a command prompt to see a listing of the computers in your workgroup?

"net view" is the command and argument, with "net" being the command and "view" being the argument to view computers within your network, domain, or workgroup. As always, type it without the quotations.


Where do you go to download java script?

You need not download javascript. Any machine where you have a web browser like Internet Explorer or Mozilla would have javascript inbuilt in them. If you view the source (Right click-> View Source : and you can even try on this page itself), you will see tags such as <script type="text/javascript"> These is the embedded javascript code. If you have a source too in the script tag, simply locate the address and type it out in your browser, you will have the entire javascript file.


What type of variable is altered by the experimenter in an attempt to view behavioral differences?

Independent variable


What type of a variable is altered by the experimenter in an attempt to view behavioral differences?

Independent Variable


Which command allows you to view your file 24 lines at a time?

more command


What menu contains the zoom command?

View


What is the command to view the active VG?

lsvg


Mozilla JavaScript Debugger and Microsoft Script Debugger?

Try an add on called firebug in firefox. It works great with javascript. IE has its own built-in web development tools which works fine in my view.


What command do you use to view IP address information?

For Unix/linux, use the 'ifconfig' command. For Windows, use 'ipconfig'