# 작업 셀

현재 페이지로 가져온 후 셀 이름을 통해 셀 개체를 가져오면 셀 값 수정, 셀 활성화 또는 비활성화와 같은 셀을 조작할 수 있습니다.

## 셀 조작&#x20;

셀 개체를 가져오면 셀을 조작하고 셀 개체에 대한 여러 메서드를 구현할 수 있습니다.&#x20;

예를 들어 setValue 메서드를 사용하여 지정된 셀(myCell)의 값을 설정합니다.

```javascript
// 현재 페이지 가져오기
var page= Forguncy.Page;
//현재 페이지에서 myCell이라는 이름의 셀을 가져옵니다.
  var textCell = page.getCell("myCell");
//지정된 셀의 값 설정
textCell.setValue("이동 가능한 유형");
```

1. 디자이너의 페이지에서 셀 범위를 선택하고 이름을 "myCell"으로 지정합니다.

<figure><img src="/files/UErJ6dUu15RVRKpVoKxu" alt=""><figcaption></figcaption></figure>

2. &#x20;셀 범위를 선택하고 셀 유형을 버튼으로 설정하고 명령을 \[자바스크립트로 직접 프로그래밍하기]으로 편집하고 JavaScript 코드를 입력합니다.

<figure><img src="/files/sThlcaa1oxwIrsZqfJFi" alt=""><figcaption></figcaption></figure>

3. 편집이 완료되면 \[확인]을 클릭하여 대화 상자를 닫습니다.

페이지를 실행한 후 버튼을 클릭하면 지정된 셀의 값이 설정됩니다.

<figure><img src="/files/895fVjMZKYUf051lgYGx" alt=""><figcaption></figcaption></figure>

## 셀 이벤트

셀을 가져온 후 셀에 대한 이벤트를 바인딩할 수도 있습니다.

예를 들어 bind 메서드를 사용하여 버튼에 클릭 이벤트를 추가하고 버튼을 클릭하면 경고 상자가 나타납니다.

```javascript
//클릭 이벤트 핸들러를 버튼에 바인딩
var onClick = function(arg) {
     alert("이동 가능한 타입");
}
// 현재 페이지 가져오기
var page = Forguncy.Page;
//현재 페이지에서 button이라는 이름의 버튼을 가져옵니다.
var cell = page.getCell("button");
//셀의 이벤트 바인딩
cell.bind("click", onClick);
```

1. 디자이너의 페이지에서 셀 범위를 선택하고 셀 유형을 버튼으로 설정하고 이름을 "button"으로 지정합니다.

<figure><img src="/files/A5pV1W9XIBC2VbVowqfi" alt=""><figcaption></figcaption></figure>

2. &#x20;페이지 설정에서 \[페이지 로딩 시 명령 편집]을 클릭하고 명령을 JavaScript 명령으로 선택하고 JavaScript 코드를 입력합니다.

<figure><img src="/files/yggMlJ4eYJ3MM79sCeqk" alt=""><figcaption></figcaption></figure>

3. 편집이 완료되면 \[확인]을 클릭하여 대화 상자를 닫습니다.

페이지를 실행하고 페이지에서 버튼을 클릭하면 경고 상자가 나타납니다.

<figure><img src="/files/Ots7HOa6F3reTErK1TIA" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.forguncy.co.kr/forguncy-v9/command/javascriptprogramming/workcell.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
