当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
牛客2022 暑期多校3 H Hacker(SAM + 线段树查询区间内部最大子段和)
Recognized by International Authorities | Yunzhuang Technology was selected in "RPA Global Market Pattern Report, Q3 2022"
Creo 9.0二维草图的诊断:重叠几何
Fluorescein-PEG-CLS, cholesterol-polyethylene glycol-fluorescein scientific research reagent
【论文阅读】TRO 2021: Fail-Safe Motion Planning for Online Verification of Autonomous Vehicles Using Conve
用栈实现队列
Storage engine written by golang, based on b+ tree, mmap
Software testing is seriously involution, how to improve your competitiveness?
超级完美版布局有快捷键,有背景置换(解决opencv 中文路径问题)
689. 三个无重叠子数组的最大和
internship:编写excel表的上传方法(导入)
P1449 后缀表达式
AOSP CameraLatencyHistogram的原理与使用
Republish the lab report
Pytest学习-setup/teardown
ML之yellowbrick:基于titanic泰坦尼克是否获救二分类预测数据集利用yellowbrick对LoR逻辑回归模型实现可解释性(阈值图)案例
Canvas App中点击图标生成PDF并保存到Dataverse中
rosbridge-WSL2 && carla-win11
易观分析:2022年Q2中国网络零售B2C市场交易规模达23444.7亿元
Kotlin - extension functions and operator overloading




![Scala basics [regular expressions, framework development principles]](/img/be/6531f32494b8516cd7031223d14bb2.png)




