87,993
社区成员
发帖
与我相关
我的任务
分享<html>
<body>
<script>
c=function(){alert(1); }();//不加括号也可以?
</script>
</body>
</html》var c = function() {alert(1);};
alert(c); // function() {alert(1);}
c = function() {alert(2);}();
alert(c); // undefined
(c = function() {alert(3);})();
alert(c); // function() {alert(3);}
<script type="text/javascript">
var a = function(){alert(1);};
var b = function(){alert(1);}();
alert(a);
alert(b);
</script>
jf
