• Home
Name Date Size #Lines LOC

..--

entry/12-May-2024-809742

screenshot/device/12-May-2024-

.gitignoreD12-May-2024100 77

README.mdD12-May-2024687 2010

README_zh.mdD12-May-20241.2 KiB3920

build-profile.json5D12-May-20241 KiB4341

hvigorfile.jsD12-May-2024174 21

package.jsonD12-May-2024377 1918

README.md

1# URL String Parsing
2
3### Introduction
4
5This sample shows how to add, delete, modify, and query URL string search parameters to help you understand the URL structure and usage.
6
7### Usage
8
91. Touch **Insert key-value pair**. The parameter in the text box on the left is inserted behind the search parameter.
10
112. Touch **Delete key-value pair** to delete the specified key-value pair.
12
133. Touch **Get first value** to search for and display the value of the first occurrence of the specified key.
14
154. Touch **Set new value** to delete all key-value pairs associated with the key and assign a new value to the key.
16
17### Constraints
18
19This sample can only be run on standard-system devices.
20

README_zh.md

1# URL字符串解析
2
3### 简介
4
5本示例对URL字符串的查找参数进行了增删改查的一系列操作,使得读者对URL的结构用途更加明了。实现效果如下:
6
7![](screenshot/device/main.jpeg)
8
9### 相关概念
10
111.键值插入:可以将新的键值对插入到查询字符串。
12
132.键值删除:删除指定名称的键值对。
14
153.键值判断:判断一个指定的键名对应的值是否存在。
16
174.键值获取:获取指定名称对应的第一个值。
18
195.设置新的键值:将与name关联的URLSearchParams对象中的值设置为value。
20
21### 相关权限
22
23不涉及。
24
25### 使用说明
26
271.点击**插入键值对到查询字符串**按钮,会将左面文本框的参数插入到查找参数后面。
28
292.点击**删除键值对**按钮,会将指定名称的键值对删除。
30
313.点击**获取指定名称对应的第一个值**按钮,将查找参数中该参数名对应的第一个参数值,并显示出来。
32
334.点击**设置键的新值**按钮,将与名称相关联的键值对全部删除,并赋予该键名一个新值。
34
35### 约束与限制
36
371.本示例仅支持在标准系统上运行。
38
392.本示例需要使用DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100)及以上才可编译运行。