1: <script> window.onload(function () { alert("hello"); });</script>2:<script> window.onload = function () { alert("hello"); }</script>能不能讲讲是如何调用的,window对象加载的时候,为什么第二种就可以,第一种就不行!
3 回答
元芳怎么了
TA贡献1798条经验 获得超7个赞
// 看你好像是做java的
HashMap map1=new HashMap();
map1.put("1"); // 这么写能写
map1.put = "1"; // 不能这么写
// 为啥不能,因为api就不是这么用的
学js的时候推荐你去mdn查。
幕布斯7119047
TA贡献1794条经验 获得超8个赞
添加回答
举报
0/150
提交
取消
