留言板

function does not return

bcc bcc,修改在10 年前。

function does not return

New Member 帖子: 16 加入日期: 14-3-20 最近的帖子
lfr 6.1 ga2


<aui:script use="aui-io, aui-base, aui-io-request, aui-form-validator, aui-overlay-context-panel">
			Liferay.provide(window, 'boolCheckBox',
				function() {
					var next = "aaaa";
					console.log(next);
					return next;
				},
				['aui-node']
			);
			
			Liferay.provide(window, '<portlet:namespace />submit',
				function() {
					console.log("==="+boolCheckBox());
					document.<portlet:namespace />fm.<portlet:namespace />&lt;%= Constants.CMD %&gt;.value = boolCheckBox();
					submitForm(document.<portlet:namespace />fm);
				},
				['liferay-util-list-fields']
			);
			
	......
	......
</aui:script>


The result of the console:

aaaa
===undefined

please help