开发者

How to display the page title of the destination page of a short url in mouseover text?

Not sim开发者_C百科ply the long url, but the pagetitle for the destination page.


you can use title attribute

<a title="page title" href="../fdf/page">Go</a>


You have to do something like that (jQuery dummy code):

$(document).ready(function() {
    $('a').each(function() {
        var page = $.get($(this).attr('href'));
        var title = page.match('/<title>(.*)<\/title>/');
        $(this).attr('title', title);
    })
})

... feel free to edit and fix this solution...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜