# OnFocus

The **OnFocus** client-side event handler is called when the input control gets focus.

> note The **OnFocus** event is supported by all **RadInput** controls, if they are not **ReadOnly** .

Two parameters are passed to the event handler:

* **sender** is the input control.

* **eventArgs** is an instance of [Sys.EventArgs](https://www.asp.net/AJAX/Documentation/Live/ClientReference/Sys/EventArgsClass/default.aspx).

The following example uses the **OnFocus** event to show an alert:

```ASPNET
<telerik:RadDateInput RenderMode="Lightweight" ID="RadDateInput1" runat="server">
	<ClientEvents OnFocus="Focus" />
</telerik:RadDateInput>
```

```JavaScript
<script type="text/javascript">
	function Focus(sender, eventArgs)
	{
		alert(sender.get_id());
	}
</script>
```

## See Also

* [Receiving Focus](https://www.telerik.com/products/aspnet-ajax/documentation/controls/dateinput/features/receiving-focus)

* [OnBlur](https://www.telerik.com/products/aspnet-ajax/documentation/controls/dateinput/client-side-programming/events/onblur)
