I have the following script:
<script>var b=document;var c=varName;b.write(c);</script>
and I want to pass the value from the <script> tag to the name URL parameter in a link, in place of the * here:
`<a href="whatsapp://send?text='Hello This is My Demo Site. Visit http://example.com/ex.html?name=ABC*'"> WhatsApp </a>`
My attempt resulted in getting the whole script string:
<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>