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:
http://www.google.com/123开发者_StackOverflow中文版
http://www.google.com/"24234
http://www.google.com/example
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]);
});
精彩评论