【发布时间】:2015-12-16 04:19:55
【问题描述】:
我有以下脚本:
<script>var b=document;var c=varName;b.write(c);</script>
我想将<script> 标记中的值传递给链接中的name URL 参数,以代替此处的*:
`<a href="whatsapp://send?text='Hello This is My Demo Site. Visit http://example.com/ex.html?name=ABC*'"> WhatsApp </a>`
我的尝试得到了整个脚本字符串:
<a href="whatsapp://send?text='Hello This is My Demo Site. Visit http://example.com/ex.html?name=ABC<script>var b=document;var c=varName;b.write(c);</script>'"> WhatsApp </a>
【问题讨论】:
-
道歉,但这完全不清楚。也许你可以请朋友或同事帮忙学英语。
-
@T.J.Crowder 我已编辑。
标签: javascript html href