Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript how to change anchor style

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 :: adonis count with where 
Javascript :: splice last element from array javascript 
Javascript :: joi enum validation 
Javascript :: array sort by alphabetical javascript 
Javascript :: express cors 
Javascript :: pangram javascript 
Javascript :: redirect to another page javascript 
Javascript :: redirect script javascript 
Javascript :: redirect with javascript to another page 
Javascript :: javascript addeventlistener to class 
Javascript :: html call javascript variable 
Javascript :: iso date javascript 
Javascript :: input change event in javascript 
Javascript :: how to return character associated to character code javascript 
Javascript :: hashnode.com 
Javascript :: inner content 
Javascript :: node js util promisify 
Javascript :: how to add font family in material ui 
Javascript :: disable unused vars 
Javascript :: typescript filter array of objects 
Javascript :: javascript thousand separator 
Javascript :: random in a range js 
Javascript :: react native open phone 
Javascript :: jquery empty and append 
Javascript :: what is niceScroll 
Javascript :: detect user browser javascript 
Javascript :: how to add parameters to url javascript 
Javascript :: mktime in js 
Javascript :: compare dates in js 
Javascript :: javascript to help find overflow elements 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =