javascript - Passing string variable to url on click JS -


pass 2 string variables, 'banker' and 'Lisburn' url by clicking on the URL.

  & lt; Script & gt; Var Banger = 'Banger'; Var Lisburn = 'Lisburn'; & Lt; / Script & gt; & Lt; Script & gt; Document.write (Banner + "& amp; nbsp; & amp; nbsp; + Lisburn) & lt; / script & gt; & lt; a href =" # "& gt; click & lt; / a & gt;  

I'll need some more information, but I think you do something like that Can:

  & lt; an id = "link" href = "#" & gt; Click & lt; / a & gt; & lt; script & gt; Document.getElementById ("Link"). Href = Bangar + "& amp; Nbsp; & Amp; Nbsp; + Lisburn; & Lt; / Script & gt;  

Comments