当前位置:网站首页>location search 属性获取登录用户名
location search 属性获取登录用户名
2022-07-05 08:43:00 【王小婷】
定义和用法
search 属性是一个可读可写的字符串,可设置或返回当前 URL 的查询部分(问号 ? 之后的部分)。 语法
location.search现在要获取 username=mote 获取到mote即可
打开浏览器的控制台 输入
location search可以获取链接?后面的部分
然后对获取到的字符串进行分割处理
定义和用法:split() 方法用于把一个字符串分割成字符串数组。再从数组里面取到自己想要的下标值即可
location.search.split("=")[1]
边栏推荐
- Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding
- Run menu analysis
- Meta标签详解
- U8g2 drawing
- Guess riddles (10)
- Warning: retrying occurs during PIP installation
- Task failed task_ 1641530057069_ 0002_ m_ 000000
- C# LINQ源码分析之Count
- Example 002: the bonus paid by the "individual income tax calculation" enterprise is based on the profit commission. When the profit (I) is less than or equal to 100000 yuan, the bonus can be increase
- Speech recognition learning summary
猜你喜欢

Xrosstools tool installation for X-Series

Example 008: 99 multiplication table

Example 006: Fibonacci series
![[matlab] matlab reads and writes Excel](/img/80/78e4c7fcd27473526e480d4b930e2c.jpg)
[matlab] matlab reads and writes Excel

Arduino burning program and Arduino burning bootloader

Halcon affine transformations to regions

Example 010: time to show

Halcon clolor_ pieces. Hedv: classifier_ Color recognition

剑指 Offer 06. 从尾到头打印链表

Example 005: three numbers sorting input three integers x, y, Z, please output these three numbers from small to large.
随机推荐
暑假第一周
Halcon color recognition_ fuses. hdev:classify fuses by color
[牛客网刷题 Day4] JZ35 复杂链表的复制
Halcon clolor_ pieces. Hedv: classifier_ Color recognition
Arduino operation stm32
js异步错误处理
Halcon wood texture recognition
287. Looking for repeats - fast and slow pointer
Example 008: 99 multiplication table
Halcon shape_ trans
[formation quotidienne - Tencent Selection 50] 557. Inverser le mot III dans la chaîne
我从技术到产品经理的几点体会
Esp8266 interrupt configuration
整形的分类:short in long longlong
Meizu Bluetooth remote control temperature and humidity access homeassistant
Arduino burning program and Arduino burning bootloader
Typical low code apaas manufacturer cases
Latex improve
Arrangement of some library files
Search data in geo database