RadControls for ASP.NET AJAX 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.
The following example uses the OnFocus event to show an alert:
CopyASPX
<telerik:RadTextBox ID="RadTextBox1" runat="server">
<ClientEvents OnFocus="Focus" />
</telerik:RadTextBox>
CopyJavaScript
<script type="text/javascript">
function Focus(sender, eventArgs)
{
alert(sender.get_id());
}
</script>
See Also