Function, Event

You use "function" for declaring a function. If there is no return sentence, "undefined" returns.

function name(argument1[,argument2[,...]])){

	return [value];

}


By some parts in VidyaVitamin, the event function to execute the specified function under specific conditions is provided. You use "attachEvent" method, in order to implement an event. For example, if you want to add a click event to a button parts "Button", you enter such as

Button.attachEvent("click", onClick);

function onClick(){

	// The contents of execution of a click event

}


. Please refer to explanation of each parts class for the argument and the contents which can be specified by attachEvent.