如何将当前URL添加到A HREF [英] How to add current url to A HREF
本文介绍了如何将当前URL添加到A HREF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< li class = facebook > < a href = http://www.facebook.com/share.php?u=CURRENT网址在这里 target = _ blank > < / a > < /立 >
解决方案
是的,你可以用更换功能的帮助。
查看演示 - [演示]替换Href锚点[ ^ ]了解它是如何完成的。
这里锚中的 CURRENT_URL_GOES_HERE 被CodeProject Url取代。
HI could you help me please I have like 200 pages and I want to add a custom facebook share button but the problem is I will need to add all those urls to share button. Is there a way to automatically add page url to the the code below wher it say "CURRENT URL GOES HERE".
<li class="facebook"><a href="http://www.facebook.com/share.php?u=CURRENT URL GOES HERE" target="_blank"> </a></li>
解决方案
Yes, you can do it with the help of replace function.
Check the demo - [Demo] Replace Href of Anchor[^] to know how it is done.
Here the "CURRENT_URL_GOES_HERE" inside the anchor gets replaced with the CodeProject Url.
这篇关于如何将当前URL添加到A HREF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文