You are here: Reference > JavaScript > client-side > HTML DOM > properties > Methods (a)

Methods property (a)

Browser support:
Specifies or returns a comma-separated list of HTTP METHODS supported by the object and accessible to the user.
This property is poorly supported by browsers and was never used much in HTML documents.

Syntax:

object.Methods;
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: methods

Possible values:

String that sets or retrieves a comma-separated list of HTTP methods.
The list of the possible methods:
OPTIONS
Represents a request about the available communication options.
GET
Retrieves information.
HEAD
Retrieves information without message-body.
POST
Posts information.
PUT
Stores entity under the specified Request-URI.
DELETE
Deletes resource from the specified Request-URI.
TRACE
Gives an advice from the sent request message.
CONNECT
Switches proxy to a tunnel (SSL).
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the Methods attribute:
<a methods="OPTIONS, PUT">
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the Methods property:
<head>
    <script type="text/javascript">
        function GetMethods () {
            var anchor = document.getElementById ("myAnchor");
            alert (anchor.Methods);
        }
    </script>
</head>
<body>
    <a id="myAnchor" methods="OPTIONS, PUT">a sample link</a>
    <button onclick="GetMethods ();">Get methods!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

External links:

User Contributed Comments

Post Content

Post Content