11智能在线
新记
怎样在html中的href属性使用javascript变量?
如题所述
举报该文章
相关建议 2018-01-31
<a href="#" onclick="location.href=url_search;"> //这样会是当前页面打开
可以给a一个id
<a href="#" id="url">
<script>
document.getElementById("url").href = url_search;
</script>
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/7fsvv4q727q4qfqp2p.html
其他看法
无其他回答
相似回答
大家正在搜
相关问题
怎样在html中的href属性使用javascript变量?
在线等!!javascript或者html 要在超链接hre...
html中href="javascript:"是什么意思
html a标签的href怎么拼进去js的变量
如何在html页面中使用js变量
html中data-href属性的用法?
关于html,<a href="要连接的地址">中的地址,如...
怎样在HTML代码中使用JAVASCRIPT中变量的值