当前位置:网站首页>JS get parameter value of URL hyperlink
JS get parameter value of URL hyperlink
2022-08-03 23:23:00 【IK_LinKing】
Hyperlink: http://xxxxxxx.html?id=10
$(function(){var idPre = window.location.href.split("?")[1];var id = idPre.split("=")[1];
Explanation:
window.location.href gets the entire link
window.location.href.split(“?”)[ 1 ] ; Cut from ?, [1] means to take the right side, that is, take out id = 10
Then right = split, take the right [1], and get the number 10
边栏推荐
- MiniAPI of .NET6 (14): Cross-domain CORS (Part 1)
- 689. 三个无重叠子数组的最大和
- 2022/8/3 Exam Summary
- What is the difference between the generator version and the viewer version?
- Click the icon in Canvas App to generate PDF and save it to Dataverse
- Binary search tree to solve the fallen leaves problem
- 【开源框架】国内首个通用云计算框架,任意程序都可做成云计算。
- Zilliz 2023 秋季校园招聘正式启动!
- 使用tf.image.resize() 和tf.image.resize_with_pad()调整图像大小
- 设置工作模式与环境(下):探查和收集信息
猜你喜欢
直播预告 | 构建业务智联,快速拥抱财务数字化转型
Scala基础【正则表达式、框架式开发原则】
Analysys Analysis: The transaction scale of China's online retail B2C market in Q2 2022 will reach 2,344.47 billion yuan
Minimized installation of debian11
3D 语义分割——2DPASS
Zilliz 2023 秋季校园招聘正式启动!
OPC UA 与IEC61499 深度融合(1)
用栈实现队列
FinClip最易用的智能电视小程序
【深度学习】基于tensorflow的服装图像分类训练(数据集:Fashion-MNIST)
随机推荐
Storage engine written by golang, based on b+ tree, mmap
Creo 9.0二维草图的诊断:着色封闭环
生成器版和查看器版有什么区别?
RPA power business automation super order!
Super perfect version of the layout have shortcut, background replacement (solve the problem of opencv Chinese path)
Creo 9.0在草图环境中创建坐标系
直播系统聊天技术(八):vivo直播系统中IM消息模块的架构实践
禾匠编译错误记录
Quickly build a website with static files
Deep integration of OPC UA and IEC61499 (1)
Flutter教程之为什么 Flutter 是创业的最佳选择?
用队列模拟实现栈
jav一键生成数据库文档
七夕活动浪漫上线,别让网络拖慢和小姐姐的开黑时间
Use tf.image.resize() and tf.image.resize_with_pad() to resize images
Creo 9.0二维草图的诊断:加亮开放端点
Unity2021 releases WebGL fog effect disappearing problem
Fluorescein-PEG-CLS, cholesterol-polyethylene glycol-fluorescein scientific research reagent
curl使用指南
leetcode/子串中不能有重复字符的最长子串