<input type="checkbox" name="hobby" id="hobby1">  音乐
<input type="checkbox" name="hobby" id="hobby2"> 登山
<input type="checkbox" name="hobby" id="hobby3"> 游泳
<input type="checkbox" name="hobby" id="hobby4"> 阅读
<input type="checkbox" name="hobby" id="hobby5"> 打球
<input type="checkbox" name="hobby" id="hobby6"> 跑步
<input type="button" value = "全选" id="button1">
<input type="button" value = "全不选" id="button1">

1. document.getElementsByTagName("input"),结果为获取所有标签为input的元素,共8个。

2. document.getElementsByName("hobby"),结果为获取属性name="hobby"的元素,共6个。

3. document.getElementById("hobby6"),结果为获取属性id="hobby6"的元素,只有一个,"跑步"这个复选项。

最新文章

  1. windows下编译chromium浏览器的15个流程整理
  2. UITextView实现placeHolder方法汇总
  3. Getshell Via phpmyadmin SQL Execution In /import.php To Write Evil Webshell File Into Disk
  4. cookie的设置、获取以及删除
  5. RAC,客户端连接失败ORA-12514
  6. java.lang.NumberFormatException: empty String 错误
  7. Android 启动Activity的方式
  8. C#的Task和Java的Future
  9. Python中的classmethod与staticmethod
  10. [HNOI2011]赛车游戏
  11. python 验证码识别示例(二) 复杂验证码识别
  12. SqlServer 行转列,列转行 以及PIVOT函数快速实现行转列,UNPIVOT实现列转行
  13. [Leetcode 771]宝石和石子 Jewels and Stones HashSet简单应用
  14. 网页打印样式CSS
  15. MySQL基准测试(二)--方法
  16. c# 创建项目时提示:未能正确加载“microsoft.data.entity.design.bootstrappackage.。。。。
  17. 在虚拟机上安装gho、esd(wim)系统镜像文件
  18. Linux U盘安装
  19. [UE4]给Widget增加参数,Pre Construct和Construct的区别
  20. GitHub出现Permissiondenied (publickey).

热门文章

  1. 咕咕咕,skkyk的博客生活从此开始了
  2. luogu3834 【模板】可持久化线段树 1(主席树)
  3. 爬虫开发python工具包介绍 (4)
  4. [工具使用] visualvm 通过jmx不能连接
  5. Given a binary tree, return the level order traversal of its nodes&#39; values. (ie, from left to right, level by level). For example: Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20 / \
  6. ospf 提升 二 ---LSA
  7. 【Luogu】P2324骑士精神(IDA*)
  8. 【2018.10.20】noip模拟赛Day3 飞行时间
  9. angular中ng-repeat去重
  10. POJ Blue Jeans [枚举+KMP]