码迷,mamicode.com
首页 > Web开发 > 详细

JS的document.links函数使用示例

时间:2017-05-12 13:25:12      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:s函数   length   back   href   blog   head   示例   ext   sem   

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>JS的document.links函数使用示例</title>
    </head>
    <body>
        <img src="planets.gif" width="145" height="126" usemap="#planetmap" />

        <map name="planetmap">
            <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm" />
        </map>
        
        Number of links in this document:
        <script type="text/javascript">
            document.write(document.links.length);
            document.write(document.links[0].id);
        </script>
    </body>
</html>

JS的document.links函数使用示例

标签:s函数   length   back   href   blog   head   示例   ext   sem   

原文地址:http://www.cnblogs.com/tanxiang6690/p/6844923.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!