See also: addAttribute getAttribute, setAttribute

Deletes an attribute/value pair from a query string.

Syntax

JSV_deleteAttribute(expQ, attribute [, caseSensitive])

Prototype

expQ.deleteAttribute(attribute [, caseSensitive])

Returns

The query string with the attribute/value deleted.

Parameters

The deleteAttribute function uses the following arguments.

Argument Description
expQ The query string (e.g., ?ABC=123&L=Page1?Music=R%26B) that is to be parsed.
attribute The attribute name to be deleted from the query string.
caseSensitive Optional. Boolean value that determines if the attribute name comparison is case sensitive. Default value is false.

Remarks

n/a

Dependencies

n/a

Example

The following lines of code

var qs = "?ABC=123&L=Page1&Music=R%26B";
var newQS = JSV_deleteAttribute(qs, "L");
document.write( "The new query string is " + newQS.bold() );

produce