当前位置:网站首页>Get parameters on link
Get parameters on link
2022-06-13 04:18:00 【Twinkle, twinkle, twinkle, twinkle, twinkle, twinkle, twinkle, 】
getParams(url){
let str=url.split('?')[1]//? What's behind the number is what we need name=quan&age=21&sex=1
let arr=str.split('&')//["name=quan", "age=21", "sex=1"]
let obj={}
for(let i=0;i<arr.length;i++){
let key=arr[i].split('=')//["name", "quan"] ["age", "21"] ["sex", "1"]
obj[key[0]]=key[1]
}
return obj
},边栏推荐
- Reread the classic: end to end object detection with transformers
- Lambda termination operation find and match nonematch
- 基于DE2-115平台的VGA显示
- 【LeetCode】860. Change with lemonade (2 brushes for wrong questions)
- Lightweight digital mall system based on PHP
- Real time requirements for 5g China Unicom repeater network management protocol
- Redis
- Uni app enables pull-up loading and pull-down refresh (pull-down with animation)
- SQL 进阶挑战(1 - 5)
- Zoom and move the H5 part of the mobile end
猜你喜欢
![[test development] installation of test management tool Zen path](/img/8b/363e393bdb2d3400a2e8361af8677d.png)
[test development] installation of test management tool Zen path

Differences and relations between three-tier architecture and MVC

Solution to failure to download files by wechat scanning QR code

史上最详细的Swin-Transformer 掩码机制(mask of window attentation)————shaoshuai

10 minutes to thoroughly understand how to configure sub domain names to deploy multiple projects

ET框架-22 创建ServerInfo实体及事件

2019 Blue Bridge Cup

高等数学(第七版)同济大学 习题1-3 个人解答

Dumi builds a document blog

Redis
随机推荐
The WebView case of flutter
Single chip microcomputer: basic concepts of a/d and d/a
Modeling discussion series 143 data processing, analysis and decision system development
EIA map making - data processing + map making
Hugo 博客搭建教程
[test development] file compression project practice
Principle and control program of single chip microcomputer serial port communication
Lambda termination operation Max & min
Redis
[test development] advanced part - Classification of various test technologies
On the value of line height
5g China Unicom ap:b SMS ASCII transcoding requirements
Redis hyperloglog cardinality statistics algorithm
Lambda end operation reduce merge
【LeetCode】860. Change with lemonade (2 brushes for wrong questions)
[note]vs2015 compilation of masm32 using MASM32 Library
EGO planner论文翻译
Knife4j aggregation 2.0.9 supports automatic refresh of routing documents
Introduction to RFM analysis
SCM: introduction and operation of EEPROM