<!doctype html>
<html lang=
"en"
>
<head>
<meta charset=
"UTF-8"
>
<meta name=
"Generator"
content=
"EditPlus®"
>
<meta name=
"Author"
content=
""
>
<meta name=
"Keywords"
content=
""
>
<meta name=
"Description"
content=
""
>
<title>Document</title>
</head>
<body>
<div id=
"container"
style=
"width: 480px; height: 220px;border:1px solid #e3e3e3;"
onclick=
"renderLink();"
>
<a href=
"#"
class=
"mya"
>Test1</a>
<a href=
"#"
>Test2</a>
<a href=
"#"
class=
"mya"
>Test3</a>
<a href=
"#"
class=
"mya"
>Test4</a>
<a href=
"#"
class=
"mya"
>Test5</a>
<a href=
"#"
>Test6</a>
</div>
</body>
</html>
<script type=
"text/javascript"
>
function
renderLink(){
var
alist = document.getElementsByClassName(
"mya"
);
if
(alist){
for
(
var
idx = 0; idx < alist.length; idx ++){
var
mya = alist[idx];
mya.style.color =
"red"
;
mya.style.fontSize =
"36px"
;
}
}
}
</script>