d = commandStack.shift() ){ // 从堆栈里依次取出命令并执行
				command();
			}
		};


	</script>
	</html>


	<script type="text/javascript">
		var closeDoorCommand = {
			execute: function(){
				console.log( '关门' );
			}
		};
		var openPcCommand = {
			execute: function(){
				console.log( '开电脑' );
			}
		};

		var openQQCommand = {
			execute: function(){
				console.log( '登录QQ' );
			}
		};

		var MacroCommand = function(){
			return {
				commandsL