반응형
ㅇ키 이벤트 잡아오기
바디에 이벤트를 달아준다.
<body onKeyPress="getKeyPress">
Sub getKeyPress
msgbox window.event.Keycode
if (window.event.Keycode == 27) Then
Call fn_my
End If
End Sub
ㅇ어레이
1. 고정어레이
Dim arr
arr = Array("a","b","c")
2. 동적 어레이
Set dArr = CreateObject("System.Collections.ArrayList")
dArr.Add "hello"
dArr.Count
dArr.RemoveAt dArr.Count - 1
dArr(1)
3. 분할 생성 어레이
txt= "a,b,c"
arr = Split(txt, ",")
For Each item in arr
msgbox item
Next
ㅇhtml 제어
- 기본
tmpDiv.style.visibility = "hidden"
tmpDiv.style.visibility = "visible"
tmpDiv.innerHTML = "멍멍"
tmpDiv.style.left = "50%"
tmpDiv.style.width = "50%"
tmpDiv.style.textalign = "left"
- Div 동적 추가
Set newDiv = document.createElement("div")
With newDiv
.Id = "hello"
End With
newDiv.margintop = "20px"
mainDiv.appendChild newDiv
- 테이블
rowCnt = 0
tblRowCnt = tbl.rows.length
Do While rowCnt < tblRowCnt
tbl.deleteRow(0)
rowCnt = rowCnt + 1
Loop
Set tblRow = tbl.insertRow()
Set tblCell = tblRow.insertCell()
tblCell.style.textalign = "left"
tblCell.style.verticalAlign = "top"
tblCell.innerHTML = "멍멍"
tblCell.style.color = "#d1d1d1"
바디에 이벤트를 달아준다.
<body onKeyPress="getKeyPress">
Sub getKeyPress
msgbox window.event.Keycode
if (window.event.Keycode == 27) Then
Call fn_my
End If
End Sub
ㅇ어레이
1. 고정어레이
Dim arr
arr = Array("a","b","c")
2. 동적 어레이
Set dArr = CreateObject("System.Collections.ArrayList")
dArr.Add "hello"
dArr.Count
dArr.RemoveAt dArr.Count - 1
dArr(1)
3. 분할 생성 어레이
txt= "a,b,c"
arr = Split(txt, ",")
For Each item in arr
msgbox item
Next
ㅇhtml 제어
- 기본
tmpDiv.style.visibility = "hidden"
tmpDiv.style.visibility = "visible"
tmpDiv.innerHTML = "멍멍"
tmpDiv.style.left = "50%"
tmpDiv.style.width = "50%"
tmpDiv.style.textalign = "left"
- Div 동적 추가
Set newDiv = document.createElement("div")
With newDiv
.Id = "hello"
End With
newDiv.margintop = "20px"
mainDiv.appendChild newDiv
- 테이블
rowCnt = 0
tblRowCnt = tbl.rows.length
Do While rowCnt < tblRowCnt
tbl.deleteRow(0)
rowCnt = rowCnt + 1
Loop
Set tblRow = tbl.insertRow()
Set tblCell = tblRow.insertCell()
tblCell.style.textalign = "left"
tblCell.style.verticalAlign = "top"
tblCell.innerHTML = "멍멍"
tblCell.style.color = "#d1d1d1"
반응형
'TechNical > WMI' 카테고리의 다른 글
[HTA] 네트워크드라이브를 이용한 채팅 (0) | 2020.02.23 |
---|---|
HTA 화면 제어 (0) | 2020.02.13 |
일괄 파일 생성을 해 봅시다. (0) | 2010.06.28 |
HTA] 자주쓰는 배치를 파라메터도 주고 쉽게 실행을 해보자. (0) | 2010.06.23 |
HTA] 특정 문자를 찾아서 배열에서 차례대로 매칭 시키기 (0) | 2010.06.11 |
댓글