开发者

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

开发者 https://www.devze.com 2023-03-31 22:19 出处:网络
Not sim开发者_C百科ply the long url, but the pagetitle for the destination page.you can use title attribute

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

精彩评论

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