About 13,100,000 results
Open links in new tab
  1. HTTP GET request in JavaScript? - Stack Overflow

    Oct 29, 2008 · You can get an HTTP GET request in two ways: This approach based on xml format. You have to pass the URL for the request. xmlhttp.open("GET","URL",true); xmlhttp.send(); This one is based on jQuery. You have to …

  2. javascript - What is the "get" keyword before a function in a class ...

    Aug 13, 2015 · The get keyword will bind an object property to a function. When this property is looked up now the getter function is called. When this property is looked up now the getter function is called. The return value of the getter function then …

  3. Getters and Setters in JavaScript - Stack Overflow

    Getters and Setters in JavaScript Overview. Getters and setters in JavaScript are used for defining computed properties, or accessors. A computed property is one that uses a function to get or set an object value. The basic theory is doing something like this:

  4. javascript - Get cookie by name - Stack Overflow

    May 24, 2012 · @user3132564 tried to edit this in, but its actually a comment: This method returns the wrong value when you search for a suffix of a cookie - if the value of document.cookie is "FirstName=John" and you call getCookie("Name"), you'll get back "John" even though there's no cookie by that name.

  5. javascript - What does [object Object] mean? - Stack Overflow

    The object whose class is Object seems quite different from the usual class instance object, because it acts like an associative array or list: it can be created by simple object literals (a list of keys and properties), like this: let obj={A:'a',B:'b'}; and because it looks very like this same literal notation when displayed in the Developer Tools Console pane and when it is converted to a ...

  6. Get local href value from anchor (a) tag - Stack Overflow

    I have an anchor tag that has a local href value, and a JavaScript function that uses the href value but directs it to a slightly different place than it would normally go. The tag looks like <a

  7. javascript - How to get the function name from within that …

    Apr 16, 2010 · You can use name property to get the function name, unless you're using an anonymous function. For example: var Person = function Person { this.someMethod = function {}; }; Person.prototype.getSomeMethodName = function { return this.someMethod.name; }; var p = new Person(); // will return "", because someMethod is assigned with anonymous function console.log(p.getSomeMethodName());

  8. javascript - Best way to get child nodes - Stack Overflow

    I was wondering, JavaScript offers a variety of methods to get the first child element from any element, but which is the best? By best, I mean: most cross-browser compatible, fastest, most comprehensive and predictable when it comes to behaviour. A list of methods/properties I …

  9. javascript - How to get parent multiple levels up the DOM tree …

    There is really only one other way, which is to use the DOM API element.closest(), but it does require that you provide a selector that can uniquely identify the particular element you need (or the first element that matches that selector from the descendant's point of view).

  10. javascript get type/instance name - Stack Overflow

    Aug 7, 2011 · TL;DR: In regards to the actual question in the title ("get type/instance name"), use Object.getPrototypeOf(instanceName).constructor to safely access (due to immutability) the object's constructor function, which will be its actual JS type (e.g. the type of its class, or just Object, Function, Number, String, etc.), and then use …

Refresh