search
特性为
URL
interface is a search string, also called a
query string
, that is a
USVString
包含
'?'
followed by the parameters of the URL.
Modern browsers provide the
URL.searchParams
property to make it easy to parse out the parameters from the query string.
const searchParams = object.search url.search = newSearchParams
A
USVString
.
const url = new URL('../API/URL/search?q=123');
console.log(url.search); // Logs "?q=123"
| 规范 | 状态 | 注释 |
|---|---|---|
|
URL
The definition of 'URL.search' in that specification. |
实时标准 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
search
|
Chrome Yes | Edge 13 |
Firefox
53
|
IE No | Opera Yes | Safari 10 | WebView Android Yes | Chrome Android Yes |
Firefox Android
53
|
Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
完整支持
不支持
见实现注意事项。
URL
interface it belongs to.