Categories
Html how to pass macro to js?
It is necessary to substitute links in %link1% via js. The markup itself:<a href="%link1%>link</a>
<a href="%link1%>link</a>
Answer the question
In order to leave comments, you need to log in
Can
var link1 = "http://yandex.ru"; for(var i=0;i<document.links.length;i++) { var a = document.links[i]; if(a.href == "%link1%") a.href = link1; }
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question