> For the complete documentation index, see [llms.txt](https://docs-kr.zep.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-kr.zep.us/zep-script-api/zepscriptapi/scriptwidget/field.md).

# Field

### 소개

위젯과 관련된 속성 값을 조회 할 수 있습니다.

🔒 아이콘이 있는 필드는 수정이 불가능한 읽기 전용 필드입니다.

<table><thead><tr><th width="165">이름</th><th>설명</th></tr></thead><tbody><tr><td>🔒 id</td><td>위젯의 id 값을 가져옵니다.</td></tr></tbody></table>

## 📚 API 설명 및 예제

### id

{% hint style="info" %}
widget.id
{% endhint %}

위젯의 아이디 값을 가져옵니다.

**예제**

위젯 아이디 값 출력해보기

{% file src="/files/9RU0t0vGgN7qNWkFaj1R" %}

![](https://2461137890-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiW553XSGeKCAPpImxXi3%2Fuploads%2FWxAMdnm4FRMhUTwuyKTj%2FUntitled.png?alt=media\&token=ffbe8110-544c-4b8c-be8d-885158be6dcb)

```jsx
let _widget = null;
// q 키를 누르면 동작하는 함수
// App.addOnKeyDown
App.addOnKeyDown(81, function (player) {
	_widget = player.showWidget("sample.html","top",300,300);
	App.sayToAll(`위젯 아이디: ${_widget.id}`)
});
```

***

### 부록

[위젯에서 사용가능한 문법](/creator/reference/scriptaction.md)
