当前位置:网站首页>JS获得URL超链接的参数值
JS获得URL超链接的参数值
2022-08-03 23:10:00 【IK_LinKing】
超链接: http://xxxxxxx.html?id=10
$(function(){
var idPre = window.location.href.split("?")[1];
var id = idPre.split("=")[1];
解释说明:
window.location.href 获取整个链接
window.location.href.split(“?”)[ 1 ] ; 从?切开,[1]的意思是取右边,即取出了 id = 10
再对=分割,取右边[1],就得到了 数字10
边栏推荐
- 3D 语义分割——2DPASS
- Creo 9.0二维草图的诊断:加亮开放端点
- Kotlin - 扩展函数和运算符重载
- HDU 5655 CA Loves Stick
- ML's yellowbrick: A case of interpretability (threshold map) for LoR logistic regression model using yellowbrick based on whether Titanic was rescued or not based on the two-class prediction dataset
- 物联网新零售模式,引领购物新潮流
- 重发布实验报告
- P1996 约瑟夫问题
- 2022/8/3 考试总结
- 设置工作模式与环境(下):探查和收集信息
猜你喜欢

直播预告 | 构建业务智联,快速拥抱财务数字化转型

The principle and use of AOSP CameraLatencyHistogram

win10系统下yolov5-V6.1版本的tensorrt部署细节教程及bug修改

rosbridge-WSL2 && carla-win11

Lift, Splat, Shoot: Encoding Images from Arbitrary Camera Rigs by Implicitly Unprojecting to 3D 论文笔记
![[Paper Reading] TRO 2021: Fail-Safe Motion Planning for Online Verification of Autonomous Vehicles Using Conve](/img/17/342676e20fc04ce9083c5ed443bc1d.png)
[Paper Reading] TRO 2021: Fail-Safe Motion Planning for Online Verification of Autonomous Vehicles Using Conve

获国际权威认可 | 云扩科技入选《RPA全球市场格局报告,Q3 2022》

Pytest learn-setup/teardown

冰河又一MySQL力作出版(文末送书)!!

Redis persistence method
随机推荐
RPA助力商超订单自动化!
走迷宫 BFS
单例模式使用饿汉式和懒汉式创建一定安全?很多人不知
log4j-slf4j-impl cannot be present with log4j-to-slf4j
SolidEdge ST8安装教程
Websocket multi-threaded sending message error TEXT_PARTIAL_WRITING--Use case of spin lock replacing synchronized exclusive lock
雅思大作文写作模版
FinClip,助长智能电视更多想象空间
Testng监听器
UVa 437 - The Tower of Babylon (White Book)
Creo 9.0二维草图的诊断:加亮开放端点
【LeetCode】最长公共子序列(动态规划)
LabVIEW code generation error 61056
rosbridge-WSL2 && carla-win11
用两个栈模拟队列
Another MySQL masterpiece published by Glacier (send the book at the end of the article)!!
创建函数报错,提示DECLARE定义语法问题
【RYU】rest_router.py源码解析
P1449 后缀表达式
MiniAPI of .NET6 (14): Cross-domain CORS (Part 1)