开发者

Searching links with DOMAssistant

I'm using DOMAssistant library to search for specific links and then replace them with some other links, but I am unable to search links.

I want to search all links that contain http://www.google.com/, and I want it to return these links:

I do not want to get it with id:

($("#id").elmsByAttribute("href");)

I'm new to js and DOMAssistant library, can anybody help me to do this?


<a href="http://semat.com.sa">semat.com.sa</a> | <a href="http://google.com">google.com</a> | <a href="http://google.com?111">google.com?111</a> | <a href="google.com?id=33edd">google.com?id=33edd</a> | <a href="http://www.google.com">http://www.google.com</a> | <a href="http://sematsystems.com">sematsystems.com</a>


<script>$('a[href*="google"]').css({"color":"red"});</script>


you can use this way for search multiple domains

<script>$('a[href*="google"], a[href*="semat"]').css({"color":"red"});</script>


var x = ['a[href*="google"]','a[href*="semat"]'];

$.each(x,function(index) {
alert(x[index]);
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜