开发者

Display only HTML links jQuery

I have 开发者_如何学编程a url and I want to display only the html links or URLs using jQuery.

Thanks Jean


Taking a wild, wild stab in the dark here, hopefully hitting something that comes close to what you're really asking. This selector will get all links on the page that end with '.html':

$('a[href$=.html]').each(function () {
    alert(this);
    // do whatever you want to do with 'this'
}

http://api.jquery.com/category/selectors/attribute-selectors/


do the pattern match for url , whether the url is ending .html extenstion .

preg_match ( '/.html$/',$url ,$val );

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜