【发布时间】:2019-05-14 09:45:22
【问题描述】:
href="" 时我试图给另一个变量
<a href="a.html" id="a">Hello</a>
以上是我的代码。
当转到a.html 时,我想传递值apple 命名为fruit 的变量。我如何在 JavaScript 或 jQuery 中做到这一点?
【问题讨论】:
-
去a.html时是什么意思?
-
您可以使用 javascript 将 href 值从
a.html更改为a.html?fruit=apple。 -
@Mohammad umm .. 去 a.html 是什么意思?当我点击你好然后它会去 a.html
标签: javascript jquery html href