document的elements

来源:互联网 发布:淘宝微淘入口 编辑:程序博客网 时间:2024/06/05 09:19
  1. <input type="text" id="demo"/>
  2. <input type="radio" name="radio1" value="1"/>
  3. <input type="radio" name="radio1" value="2"/>
  4.    
  5. document.getElementById('demo');
  6. document.getElementsByName('radio1');
  7. document.getElementsByTagName('input').item(0);

原创粉丝点击