Jump to content

kwyjibear

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About kwyjibear

  • Rank
    Newbie
  1. (I hope this is the right forum for this topic)Under the HTML DOM tutorial for Events, the first example doesn't seem to work right. It checks if the user is pressing the right mouse button by looking for a returned value of "2". If it doesn't get "2", it displays that the left button was pressed.However it always reported to me that I was pressing the left button. So I modified the code to see what numbers my mouse was returning and I came up with "1" for left, "0" for right (not "2") and "4" for the scroll wheel (the driver I have to use doesn't recognize a middle button). If these numbers are universal, then the code needs to be changed to reflect "0" for the right mouse button.
  2. W3Schools' JavaScript lessons state that a variable created in a function exists only inside that function. However I read elsewhere that that is not always the case. JavaScript tutorial at C PointAccording to them, a varialble declared in a function is local only if you use the var declaration. If you create the variable just by typing its name (example: variableName = "Hello World" then it is considered global and will work outside the function.Is this so?
  3. In the Learn JavaScript lessons, on the Throw page, it states that the command is... throw(exception) ...but in the first example, the Throw command appears as... throw "Err1" Shouldn't the exception be in parentheses?
×
×
  • Create New...