See also: getAttribute, setAttribute, deleteAttribute |
Adds an attribute/value pair to a query string.
JSV_addAttribute(expQ, attribute, value)
n/a
The query string with the new attribute/value added.
The addAttribute function uses the following arguments.
Argument | Description |
expQ | The query string (e.g., ?ABC=123&L=Page1?Music=R%26B) that is to have a new attribute/value pair added. |
attribute | The attribute name to be placed in the query string. |
value | The value to set the attribute in the query string. |
caseSensitive | Optional. Boolean value that determines if the attribute name comparison is case sensitive. Default value is false. |
The JSV_addAttribute
function will not add the attribute/value
pair to the query string if the attribute or its value is an
empty string.
n/a
The following lines of code
var qs = "?ABC=123&L=Page1&Music=R%26B";
var newQS = JSV_addAttribute(qs, "Food", "Jack in the Box");
document.write( "The new query string is " + newQS.bold() );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.