函数04(立即执行函数)
2020-03-26 本文已影响0人
小雪洁
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>立即执行函数</title>
<script src="lijizhixing.js"></script>
</head>
<body>
</body>
<script>
(function(){
console.log("立即执行函数");
})();
window.lj.hxj();//hxj
window.oc.ooo();//ooo
//window.oc.ccc();//报错Uncaught TypeError: window.oc.ccc is not a function
</script>
</html>