DHTMLX Docs & Samples Explorer

onFocus

occurs when an input gets focus.

Parameters:

  • name - (string) the item id (the value of attribute name)
  • value - (string) the item value (for checkboxes and radios only)
//for radios and checkboxes
myForm.attachEvent("onFocus", function(name, value){
	//any custom logic here
});
 
//for other controls
myForm.attachEvent("onFocus", function(name){
	//any custom logic here
});

See also: onBlur