Hi there, a method is a "function" in a object. Example:
function answers(){
this.world = function(){alert("hello world")};
}
var hello = new answers();
hello.world(); <--- world is a method of the object hello.
alert and prompt
In javascript, the word "this" refers to the ¢«Ê«_owner¢«Ê« of the function being executed. Put another way, "this" means the object that a function is a method of.
Whatever method is attached to the event, is executed.
JavaScript is a prototype based object oriented language. This means that it doesn't have classes.
The javascript split method, split(), will alter a string to make it into an array of substrings. This is useful if you would like to store each substring from the original string seperately.
The location of a substring within a string in JavaScript can be found using the indexOf() method of the string type. That method will return the placement of a string as a numerical index, starting from 0. The method takes two arguments. The first is the substring you're looking for. In this case "e." The second argument is optional, and it's the "start" argument. If you define it, you define the index from which JavaScript will start looking for the substring. By default, this index is 0 (zero.) If you want to find all of the occurrences of a string using this method, you have to write a loop. To see a working example of that, check out the JSFiddle in the related links. I've also attached a good lesson on JavaScript strings in PDF.
It seems as though this is part of Java.Swing or JavaScript. In this case this method will be called when the mouse is initially clicked on the object.
A JavaScript tutorial contains instructions that will teach you how to code in JavaScript.
Javascript does not have classes
Javascript can help in browseing
Javascript was created in 1995.
If you want to close the current window, use window.close() or simply close() If you want to close a window that is stored in a JavaScript variable, apply the method close() to it. For example: var myWindow=window.open("http:\/\/www.example.com/"); myWindow.close();