document.links对象集合

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index</title>
    <style>
        *{
            font-family: 微软雅黑;
        }
    </style>
</head>
<body>
    <p><a href="http://www.baidu.com">百度</a></p>
    <p><a href="http://www.163.com">网易</a></p>
    <p><a href="http://www.qq.com">腾讯</a></p>
</body>
<script>
objs=document.links;

for(i=0;i<objs.length;i++){
    objs[i].style.textDecoration='none'; //a标签得下划线不让显示
}
</script>
</html>
世界上最美的风景,是自己努力的模样
原文地址:https://www.cnblogs.com/xiong-hua/p/14199339.html