也就是懶加載。頁面拖到新地方就加載。html
把多個參數的函數返回成單1參數的函數
編程
鏈式編程函數
<script> function classA(){ this.lian = ""; this.zui = ""; this.tui = ""; } classA.prototype = { setLian:function(){ this.lian = "臉"; return this; }, setZui:function(){ this.zui = "嘴"; return this; }, setTui:function(){ this.tui = "腿"; return this; } }; var person = new classA(); person.setLian().setZui().setTui(); alert(person); </script>