日期:2014-05-16 浏览次数:20669 次
<sx:submit cssClass="button" value="保存" notifyTopics="showResult" beforeNotifyTopics="validateForm"/>
dojo.addOnLoad(function() {
	dojo.event.topic.subscribe('showResult', this, function(data, type, e) {
		if (type == 'load') {
			//请求成功后执行
		} else if (type == 'error') {
			//请求失败后执行
		}
	});
	dojo.event.topic.subscribe('validateForm', this, function(event, widget) {
		
		//发送请求前执行
		//若想阻止提交,使用 event.cancel = true;
	});
});