Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
HTML and CSS
Properties
 search Property

  Switch on low bandwidth view
search Property

Sets or retrieves the substring of the href property that follows the question mark.

Syntax

HTMLN/A
Scripting[ sSearch = ] object.search

Possible Values

sSearchString that specifies or receives the substring of the href property.

The property is read/write. The property has no default value.

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are not supported in IE8 mode. For more information, see About Dynamic Properties.

Remarks

The substring that follows the question mark is the query string or form data.

Example

This example function returns the search property of the current page location.

function getSearch()
{
    return document.location.search;
}

Standards Information

There is no public standard that applies to this property.

Applies To

A, AREA, location, HTMLAnchorElement Constructor, HTMLAreaElement Constructor, Location Constructor
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker