ui.url.set
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
पेज के यूआरएल फ़्रैगमेंट की वैल्यू सेट करता है. यह फ़्रैगमेंट, की और वैल्यू की डिक्शनरी को कोड में बदलता है. अगर पहले आर्ग्युमेंट के तौर पर कोई डिक्शनरी दी जाती है, तो उस डिक्शनरी में मौजूद की/वैल्यू पेयर को कोड में बदल दिया जाएगा और मौजूदा यूआरएल फ़्रैगमेंट को बदल दिया जाएगा. अगर कोई कुंजी स्ट्रिंग दी जाती है, तो सिर्फ़ उस कुंजी (और उसकी वैल्यू, दूसरा आर्ग्युमेंट) को अपडेट किया जाता है. साथ ही, यूआरएल के बाकी फ़्रैगमेंट में कोई बदलाव नहीं होता.
इस्तेमाल | रिटर्न |
---|
ui.url.set(keyOrDict, value) | |
आर्ग्यूमेंट | टाइप | विवरण |
---|
keyOrDict | Dictionary<Object>|String | यूआरएल फ़्रैगमेंट में किसी एक वैल्यू को अपडेट करने के लिए कोई कुंजी या कुंजी/वैल्यू पेयर की कोई डिक्शनरी, जो मौजूदा यूआरएल फ़्रैगमेंट की जगह लेगी. डिक्शनरी की वैल्यू, स्ट्रिंग, संख्या या बूलियन टाइप की होनी चाहिए. |
value | बूलियन|संख्या|स्ट्रिंग, ज़रूरी नहीं | किसी एक बटन से जोड़ने के लिए नई वैल्यू. यह तब ज़रूरी होता है, जब पहला आर्ग्युमेंट कोई स्ट्रिंग हो. ऐसा न होने पर, इसे अनदेखा कर दिया जाता है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eui.url.set\u003c/code\u003e lets you modify the URL fragment, which stores data as key-value pairs.\u003c/p\u003e\n"],["\u003cp\u003eYou can either replace the entire fragment with a new dictionary or update a single key's value.\u003c/p\u003e\n"],["\u003cp\u003eDictionary values in the URL fragment must be strings, numbers, or booleans.\u003c/p\u003e\n"]]],[],null,["# ui.url.set\n\n\u003cbr /\u003e\n\nSets the value of the page's URL fragment. The fragment encodes a dictionary of keys and values. If a dictionary is supplied as the first argument, the key/value pairs in that dictionary will be encoded and replace the current URL fragment. If a key string is provided, then only that key (and its value, the second argument) are updated, and the rest of the URL fragment is unchanged.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------|---------|\n| `ui.url.set(keyOrDict, `*value*`)` | |\n\n| Argument | Type | Details |\n|-------------|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `keyOrDict` | Dictionary\\\u003cObject\\\u003e\\|String | Either a key to update a single value in the URL fragment, or a dictionary of key/value pairs which will replace the existing URL fragment. Dictionary values must be of type string, number, or boolean. |\n| `value` | Boolean\\|Number\\|String, optional | The new value to associate with a single key. This is required when the first argument is a string and is otherwise ignored. |"]]