开发者

Fmylife javascript copy-paste into link

Fmylife.com has a nifty feature that when you copy the text from a post, it actually copies a LINK (html) so that when you paste it into your email/facebook/instant messenger/twitter/whatever it automatically will link to the post, giving them more traffic and more page views and more ad revenue, etc.

I looked into their javascript files but can't seem to find how they do it. How would one go about copying this beh开发者_运维问答avior?


The text in a post is actually an anchor <a> with CSS modified text-decoration: none. So , it looks like normal text, but indeed is a hyperlink.
So, when you click on it, you are redirected to the permalink of the post. Hence the behaviour.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜