当前位置:网站首页>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
边栏推荐
- 超级完美版布局有快捷键,有背景置换(解决opencv 中文路径问题)
- (PC+WAP)织梦模板不锈钢类网站
- Storage engine written by golang, based on b+ tree, mmap
- Binary search tree to solve the fallen leaves problem
- Scala基础【正则表达式、框架式开发原则】
- First domestic open source framework 】 【 general cloud computing framework, any program can be made into cloud computing.
- 响应式织梦模板塑身瑜伽类网站
- 关于IDO预售系统开发技术讲解丨浅谈IDO预售合约系统开发原理分析
- utils 定时器
- IELTS essay writing template
猜你喜欢

AOSP CameraLatencyHistogram的原理与使用

设置工作模式与环境(下):探查和收集信息

完全二叉树问题

Network basic learning series four (network layer, data link layer and some other important protocols or technologies)

栈的压入、弹出序列

用两个栈模拟队列

HCIP BGP lab report

Binary search tree to solve the fallen leaves problem

override学习(父类和子类)

《数字经济全景白皮书》金融数字用户篇 重磅发布!
随机推荐
Scala basics [regular expressions, framework development principles]
【开源框架】国内首个通用云计算框架,任意程序都可做成云计算。
Flutter教程之为什么 Flutter 是创业的最佳选择?
1067 Sort with Swap(0, i)
MiniAPI of .NET6 (14): Cross-domain CORS (Part 1)
ML之yellowbrick:基于titanic泰坦尼克是否获救二分类预测数据集利用yellowbrick对LoR逻辑回归模型实现可解释性(阈值图)案例
With the rise of concepts such as metaverse and web3.0, many digital forms such as digital people and digital scenes have begun to appear.
The longest substring that cannot have repeating characters in a leetcode/substring
超级完美版布局有快捷键,有背景置换(解决opencv 中文路径问题)
Testng监听器
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
Shell编程之循环语句与函数
【职场杂谈】售前与销售工作配合探讨
用队列模拟实现栈
Testng listener
禾匠编译错误记录
FinClip最易用的智能电视小程序
关于IDO预售系统开发技术讲解丨浅谈IDO预售合约系统开发原理分析
直播系统聊天技术(八):vivo直播系统中IM消息模块的架构实践
internship:编写excel表的上传方法(导入)