ui.url.get
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zwraca wartość danego klucza z fragmentu adresu URL.
Wykorzystanie | Zwroty |
---|
ui.url.get(key, default) | Boolean|Number|Object|String |
Argument | Typ | Szczegóły |
---|
key | Ciąg znaków | Nazwa parametru do odczytania. |
default | Wartość logiczna|Liczba|Ciąg znaków, opcjonalnie | opcjonalna wartość domyślna do zwrócenia, jeśli nie ma wartości. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eRetrieves a specific value from the URL fragment using the provided key.\u003c/p\u003e\n"],["\u003cp\u003eReturns the value associated with the key, which can be a boolean, number, object, or string.\u003c/p\u003e\n"],["\u003cp\u003eIf the key is not found in the URL fragment, an optional default value can be returned.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003eui.url.get(key, default)\u003c/code\u003e function for accessing the fragment value.\u003c/p\u003e\n"]]],[],null,["# ui.url.get\n\n\u003cbr /\u003e\n\nReturns the value of the given key from the URL fragment.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------|---------------------------------|\n| `ui.url.get(key, `*default*`)` | Boolean\\|Number\\|Object\\|String |\n\n| Argument | Type | Details |\n|-----------|-----------------------------------|----------------------------------------------------------|\n| `key` | String | The name of the parameter to read. |\n| `default` | Boolean\\|Number\\|String, optional | optional default value to return if no value is present. |"]]