当前位置:网站首页>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
边栏推荐
- 七夕活动浪漫上线,别让网络拖慢和小姐姐的开黑时间
- Another MySQL masterpiece published by Glacier (send the book at the end of the article)!!
- P1449 后缀表达式
- log4j-slf4j-impl cannot be present with log4j-to-slf4j
- Pytest学习-skip/skipif
- 最小化安装debian11
- Testng listener
- internship:编写excel表的上传方法(导入)
- Zilliz 2023 Fall Campus Recruitment Officially Launched!
- OPC UA 与IEC61499 深度融合(1)
猜你喜欢
The principle and use of AOSP CameraLatencyHistogram
Cloud platform construction solutions
Scala basics [regular expressions, framework development principles]
易观分析:2022年Q2中国网络零售B2C市场交易规模达23444.7亿元
Binary search tree to solve the fallen leaves problem
Shell编程之循环语句与函数
Redis persistence method
直播预告 | 构建业务智联,快速拥抱财务数字化转型
Creo9.0 绘制中心线
Click the icon in Canvas App to generate PDF and save it to Dataverse
随机推荐
utils 定时器
Walk the Maze BFS
utlis 线程池
禾匠编译错误记录
Recognized by International Authorities | Yunzhuang Technology was selected in "RPA Global Market Pattern Report, Q3 2022"
为什么我们需要回调
2022/8/3 考试总结
什么是memoization,它有什么用?
举一个 web worker 的例子
二叉搜索树解决落叶问题
SRE运维解密-什么是SRE:DevOps模型的具体实践!
Creo 9.0创建几何点
FinClip,助长智能电视更多想象空间
Binary search tree to solve the fallen leaves problem
工作小计 QT打包
AOSP CameraLatencyHistogram的原理与使用
curl使用指南
软件测试内卷严重,如何提升自己的竞争力呢?
直播预告 | 构建业务智联,快速拥抱财务数字化转型
Unity2021发布WebGL雾效消失问题