AUI共通列子


1、ボタン.



AUI().ready('aui-button-item', function(A) {

	var instance = new A.ButtonItem({
		icon: 'pencil',
		label: 'myFirstButton',
		handler :function(){
			alert('hello word');
		},
		render: '#divId2'
	});
	
});

instance


2、弹出对话框





	

	

	




Alloy - aui-widget Demo

AUI().ready('aui-dialog', 'aui-overlay-manager', 'dd-constrain', function(A) { var instance = new A.Dialog({ bodyContent: 'Dialog body by lance', centered: true, constrain2view: true, destroyOnClose: true, draggable: true, height: 250, resizable: false, stack: true, title: 'Dialog title', width: 500, close: true, buttons: [ { text: 'MyGo', handler: function(){ alert(' Go!'); } }, { text: 'cancel', handler: function(){ this.close( ); } } ] }); A.one('#cloneButton').on('click',function(){ instance.render(); }); A.one('#toggleButton').on('click',function(){ instance.hide(); }); });