# Javascript: TXTextControl.focus Method

> Sets the text input focus to the web editor.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.focus Method
- **100 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/focus-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/focus-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/focus-method/llms-full.txt

---

### Description

Sets the text input focus to the web editor.

### Syntax

```javascript
<void> TXTextControl.focus()
```

### Examples

The following example demonstrates `TXTextControl.focus` in a practical document-editing workflow. It sets the text input focus to the web editor.

```javascript
TXTextControl.focus();
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.flattenFormFields Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/flattenformfields-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.FontUnderlineStyle Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/fontunderlinestyle-enumeration/llms-full.txt)
