সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
google.script.url হল একটি অ্যাসিঙ্ক্রোনাস ক্লায়েন্ট-সাইড জাভাস্ক্রিপ্ট এপিআই যা বর্তমান URL প্যারামিটার এবং ফ্র্যাগমেন্ট পেতে URLগুলি অনুসন্ধান করতে পারে৷ এই API google.script.history API সমর্থন করে। এটি শুধুমাত্র একটি ওয়েব অ্যাপের প্রসঙ্গে ব্যবহার করা যেতে পারে যা IFRAME ব্যবহার করে। এটি একটি অ্যাড-অন বা কন্টেইনার-স্ক্রিপ্ট প্রসঙ্গে সাইডবার এবং ডায়ালগগুলির সাথে ব্যবহারের উদ্দেশ্যে নয়৷ আরও তথ্যের জন্য, ওয়েব অ্যাপে ব্রাউজার ইতিহাস ব্যবহার করার নির্দেশিকা দেখুন।
একটি ক্লায়েন্ট-সাইড কলব্যাক ফাংশন চালানোর জন্য, একমাত্র যুক্তি হিসাবে অবস্থান বস্তু ব্যবহার করে।
অবস্থান বস্তু
নিম্নলিখিত সারণীটি অবস্থান উপাদানগুলির উদাহরণগুলি দেখায় যা নিম্নলিখিত URLটি জিজ্ঞাসা করা হলে নির্দিষ্ট করা হবে: http://www.example.com?n=1&name=alice&n=2#headingAnchor
ক্ষেত্র
location.hash
# অক্ষরের পরে URL খণ্ডের স্ট্রিং মান, অথবা কোনো URL খণ্ড না থাকলে একটি খালি স্ট্রিং
headingAnchor
location.parameter
কী/মান জোড়ার একটি বস্তু যা URL অনুরোধের প্যারামিটারের সাথে মিলে যায়। একাধিক মান আছে এমন প্যারামিটারগুলির জন্য শুধুমাত্র প্রথম মানটি ফেরত দেওয়া হবে। যদি কোন পরামিতি উপস্থিত না থাকে তবে এটি একটি খালি বস্তু হবে।
{"name": "alice", "n": "1"}
location.parameters
location.parameter অনুরূপ একটি বস্তু, কিন্তু প্রতিটি কী-এর জন্য মানের অ্যারে সহ। যদি কোন পরামিতি উপস্থিত না থাকে তবে এটি একটি খালি বস্তু হবে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003e\u003ccode\u003egoogle.script.url\u003c/code\u003e is a client-side JavaScript API for querying URLs to get parameters and fragments within web apps.\u003c/p\u003e\n"],["\u003cp\u003eThis API works with \u003ccode\u003egoogle.script.history\u003c/code\u003e and requires the use of \u003ccode\u003eIFRAME\u003c/code\u003e in your web app.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetLocation()\u003c/code\u003e method retrieves a URL location object containing parameters and hash information, passing it to a callback function.\u003c/p\u003e\n"],["\u003cp\u003eThe location object provides access to URL components like hash, individual parameters, and all parameter values.\u003c/p\u003e\n"]]],[],null,["# Class google.script.url (Client-side API)\n\n`google.script.url` is an asynchronous client-side JavaScript\nAPI that can query URLs to obtain the current URL parameters and fragment.\nThis API supports the [`google.script.history`](/apps-script/guides/html/reference/history)\nAPI. It can only be used in the context of a web app that uses\n[`IFRAME`](/apps-script/reference/html/sandbox-mode#properties).\nIt is not intended for use with sidebars and dialogs in an add-on or\ncontainer-script context. For more information, see the\n[guide to using browser\nhistory in web apps](/apps-script/guides/web#web_apps_and_browser_history). \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------------------|-------------|------------------------------------------------------------------------------|\n| [getLocation(function)](#getLocation(Function)) | `void` | Gets a URL location object and passes it to the specified callback function. |\n\nDetailed documentation\n----------------------\n\n### `getLocation(function)`\n\nGets a [URL location object](#locationObject) and passes it to the specified callback\nfunction (as the only argument). \n\n### Index.html\n\n```html\ngoogle.script.url.getLocation(function(location) {\n console.log(location.parameters);\n console.log(location.hash);\n});\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|------------|------------|------------------------------------------------------------------------------------------------------------|\n| `function` | `Function` | a client-side callback function to run, using the [location object](#locationObject) as the only argument. |\n\n#### Location object\n\nThe following table shows examples of the location elements that would be specified if the following URL was queried: `http://www.example.com?n=1&name=alice&n=2#headingAnchor`\n\n| Fields ||\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `location.hash` | The string value of URL fragment after the `#` character, or an empty string if no URL fragment is present ``` headingAnchor ``` |\n| `location.parameter` | An object of key/value pairs that correspond to the URL request parameters. Only the first value will be returned for parameters that have multiple values. If no parameters are present, this will be an empty object. ``` {\"name\": \"alice\", \"n\": \"1\"} ``` |\n| `location.parameters` | An object similar to `location.parameter`, but with an array of values for each key. If no parameters are present, this will be an empty object. ``` {\"name\": [\"alice\"], \"n\": [\"1\", \"2\"]} ``` |\n\n*** ** * ** ***"]]