YahooUI中一个函数,最后它的形式是(function(){})(),下面是它的完整表述
<script type="text/javascript">
(function() {
var attributes = {
width: { to: 0 }
};
var anim = new YAHOO.util.Anim('demo', attributes); YAHOO.util.Event.on('demo-run', 'click', function() {
anim.animate();
}); YAHOO.log("The example has finished loading; as you interact with it, you'll see log messages appearing here.", "info", "example");
})();
</script>
<script type="text/javascript">
(function() {
var attributes = {
width: { to: 0 }
};
var anim = new YAHOO.util.Anim('demo', attributes); YAHOO.util.Event.on('demo-run', 'click', function() {
anim.animate();
}); YAHOO.log("The example has finished loading; as you interact with it, you'll see log messages appearing here.", "info", "example");
})();
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货