小编임지웅*_*임지웅的帖子

如何在href上传递变量?

当我试图给出另一个变量时 href=""

<a href="a.html" id="a">Hello</a>
Run Code Online (Sandbox Code Playgroud)

以上是我的代码。

我想在去时传递apple名为fruit变量的值a.html。我怎样才能在 JavaScript 或 jQuery 中做到这一点?

html javascript jquery href

5
推荐指数
1
解决办法
4万
查看次数

标签 统计

href ×1

html ×1

javascript ×1

jquery ×1