Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript change all anchors color

colorLinks("#00FF00");

function colorLinks(hex)
{
    var links = document.getElementsByTagName("a");
    for(var i=0;i<links.length;i++)
    {
        if(links[i].href)
        {
            links[i].style.color = hex;  
        }
    }  
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: de structuring value from object ES6 and javascript 
Javascript :: phpmyadmin is not working in ubuntu 20.04 
Javascript :: get first property from object javascript 
Javascript :: javascript sort array alphabetically 
Javascript :: Check if local storage is used or empty 
Javascript :: map images from folder react 
Javascript :: javascript redirect to relative url 
Javascript :: redirect to url in javascript 
Javascript :: function redirect javascript 
Javascript :: js display only date 
Javascript :: converst strig in number in js 
Javascript :: checking a point is in polygon 
Javascript :: regex for entire word 
Javascript :: javascript prompt 
Javascript :: js regex i modifier 
Javascript :: ajax call too functions.php 
Javascript :: json parse array local storage 
Javascript :: jquery read href attribute 
Javascript :: javascript returned function and copy to clipboard 
Javascript :: angular filter array of objects 
Javascript :: money separator in javascript 
Javascript :: javascript remove duplicate in two arrays 
Javascript :: node js unix timestamp 
Javascript :: jquery open image in new tab 
Javascript :: Exceeded timeout of 5000 ms for a test. Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test." 
Javascript :: postman test save token 
Javascript :: Javascript file in html angeben 
Javascript :: javascript remove text from string 
Javascript :: react image 
Javascript :: style font size javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =