Computer problems,Computer help
*AX SOFT>>>Programming & Design

How can I declare a global variable inside javascript function..?


Is it possible to declare global variable inside a javascript function...?

if u create any variable inside a function its scope will be local to that function only and not global. declare ur variable outside the function.

To my knowledge, it is not possible to have a global variable in javascript. You can use the variable between various functions only through passing the argument. Anyway check out with some experts too.

As per My know., Declare ur global variable in one place

and use that file

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • How can I make people visit my Blog site ?

    there are many ways to drive traffic your site,some more succesful than others. below i will list some ways i feel are effective in doing this. 1.if you are a member of any forums include a l...

  • Is it possible to convert jpg file to PES?

    Unfortunately you cannot just convert a Jpeg file to a PES. What you need is software which allows you to digitize the Jpeg file which then can become a PES file. This is not really my area o...

  • There seems to be two different ways of Int((1/sin(x))dx). One?

    both answers are correct. they differ by a constant.

    ...
  • [C#] How do I get the name of the current program's namespace?

    Hello, To get the current program (application) namespace, I assume you mean the "default namespace", you do the following: 1) Open Visual Studio 2) Load your Project (solution) to...

  • Does the Linux Professional Institute Certification (LPIC) program have an advantage in trying to find a job?

    Hello, (ANS) If you stand back a little here and bear in mind that with the cost of computing rising especially in terms of business's & companies & Corporations having to pay out v...

  • Are there any good resources for creating pi calculation programs?

    Well, I found a recursive arctan formula. The General Formulae We have just seen that there are infinitely many formulae for Pi using the Fibonacci numbers! They are: Pi/4 = arctan(1) = arcta...

  • Can you PLEASE make me a banner?

    Write me at my email addy and I'll see what I can do to help you.

    ...
  • I got the system time using java.sql.time package,i want time before 12:00 O'clock print good morning how?

    Here's a start. package com.yahoo.answers; import java.util.Date; public class GoodDay { public static void main(String[] args) { Date now = new Date(); int hours = now.get...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster