answersLogoWhite

0


Best Answer

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

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

var rhys = 3; document.write(rhys);

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Command to view the value of variable in javascript?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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'


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.


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 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.


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


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 is the command to view the active VG?

lsvg


What menu contains the zoom command?

View


What command do you use to view IP address information?

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


What is the difference between select into and createview command?

The SELECT INTO command creates a new table with data from an existing table whereas the CREATE VIEW command creates a view i.e., a virtual table from an existing table.