w3c并没有提供标准的这种使用方式,所以各浏览器实现会有差异,还是使用标准的w3c标准,getElement的方式。

记录下,老是忘记

  1. 使用documen对象的方法 getElementxxx 方式, id name class tag
    2.使用document对象直接获取
    2.1 document.id
    2.2 document.forms[index]
    2.3 document.forms[id]

document.id的方式可以获取页面的此id对象

相关文章:

  • 2021-12-21
  • 2022-12-23
  • 2021-12-05
  • 2021-12-05
  • 2022-01-19
  • 2021-12-21
猜你喜欢
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2021-12-31
  • 2021-10-03
  • 2021-12-15
  • 2022-12-23
相关资源
相似解决方案