【发布时间】:2021-09-19 05:04:50
【问题描述】:
在类似的页面
https://www.example.com/?firstname=Steven&lastname=Smith&email=steve%40gmail.com&phone=0404555555
我有一个链接到https://www.example.com/form 的按钮(锚链接)#ptsBlock_553944 .ptsCell:nth-of-type(1) .ptsEditArea.ptsInputShell
我想将当前 URL 中的 URL 参数附加到按钮的 URL,以便按钮的 href 现在是 https://www.example.com/form/?firstname=Steven&lastname=Doig&email=steve%40gmail.com&phone=0404555555
请问如何用 JavaScript 做到这一点?
【问题讨论】:
标签: javascript