当前位置:网站首页>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
边栏推荐
- 单例模式使用饿汉式和懒汉式创建一定安全?很多人不知
- Creo 9.0二维草图的诊断:加亮开放端点
- AOSP CameraLatencyHistogram的原理与使用
- 射频芯片ATE测试从入门到放弃之参数测试
- 响应式织梦模板餐饮酒店类网站
- Shell编程之循环语句与函数
- Code Casual Recording Notes_Dynamic Programming_416 Segmentation and Subsetting
- 【并发编程】ReentrantLock的lockInterruptibly()方法源码分析
- Scala basics [regular expressions, framework development principles]
- Shell 用法梳理总结
猜你喜欢

"Digital Economy Panorama White Paper" Financial Digital User Chapter released!

重发布实验报告

Shell编程之循环语句与函数

Click the icon in Canvas App to generate PDF and save it to Dataverse

redis持久化方式

Interpretation of ML: A case of global interpretation/local interpretation of EBC model interpretability based on titanic titanic rescued binary prediction data set using interpret

Walk the Maze BFS

SPOJ 2774 Longest Common Substring(两串求公共子串 SAM)

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

Scala基础【正则表达式、框架式开发原则】
随机推荐
走迷宫 BFS
【开源框架】国内首个通用云计算框架,任意程序都可做成云计算。
Super perfect version of the layout have shortcut, background replacement (solve the problem of opencv Chinese path)
Analysys Analysis: The transaction scale of China's online retail B2C market in Q2 2022 will reach 2,344.47 billion yuan
3D Semantic Segmentation - 2DPASS
单例模式使用饿汉式和懒汉式创建一定安全?很多人不知
.NET6之MiniAPI(十四):跨域CORS(上)
The sword refers to the offer question 22 - the Kth node from the bottom in the linked list
用两个栈模拟队列
Websocket multi-threaded sending message error TEXT_PARTIAL_WRITING--Use case of spin lock replacing synchronized exclusive lock
override学习(父类和子类)
689. 三个无重叠子数组的最大和
FinClip,助长智能电视更多想象空间
What is memoization and what is it good for?
Click the icon in Canvas App to generate PDF and save it to Dataverse
Interpretation of ML: A case of global interpretation/local interpretation of EBC model interpretability based on titanic titanic rescued binary prediction data set using interpret
云平台建设解决方案
2022/8/3 Exam Summary
Create function report error, prompting DECLARE definition syntax problem
Unity2021 releases WebGL fog effect disappearing problem