js  函数外获取页面元素,函数内调用为null<script>
js  函数外获取页面元素,函数内调用为null        
var a = 999;
js  函数外获取页面元素,函数内调用为null        
var b = document.getElementById("Button1");
js  函数外获取页面元素,函数内调用为null        
var c = document.getElementById("btn2");
js  函数外获取页面元素,函数内调用为null        
//设置窗口返回值
js  函数外获取页面元素,函数内调用为null
        function test()
>

弹出:
999
null
null

in function:
999
object
object

这是为什么呢?

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
猜你喜欢
  • 2021-09-26
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
  • 2022-01-25
  • 2022-12-23
相关资源
相似解决方案