마우스를 클릭한 것과 같은 효과를 내도록 onclick 이벤트를 발생시킨다.
![]() | Script | object.click() |
파라메터는 없다.
반환값은 없다.
개체 | script | IE |
---|---|---|
a | a.click() | IE3.02(win16,win32,mac),win4.0(ce,unix) |
address | address.click() | IE4.0(win16,win32,ce,unix,mac) |
applet | applet.click() | IE4.0(win16,win32,ce,unix,mac) |
area | area.click() | IE3.02(win16,win32,mac),win4.0(ce,unix) |
b | b.click() | IE4.0(win16,win32,ce,unix,mac) |
big | big.click() | IE4.0(win16,win32,ce,unix,mac) |
blockQuote | blockQuote.click() | IE4.0(win16,win32,ce,unix,mac) |
body | body.click() | IE4.0(win16,win32,ce,unix,mac) |
button | button.click() | IE4.0(win16,win32,ce,unix,mac) |
caption | caption.click() | IE4.0(win16,win32,ce,unix,mac) |
center | center.click() | IE4.0(win16,win32,ce,unix,mac) |
cite | cite.click() | IE4.0(win16,win32,ce,unix,mac) |
code | code.click() | IE4.0(win16,win32,ce,unix,mac) |
custom | custom.click() | IE5(win32,unix) |
dd | dd.click() | IE4.0(win16,win32,ce,unix,mac) |
dfn | dfn.click() | IE4.0(win16,win32,ce,unix,mac) |
dir | dir.click() | IE4.0(win16,win32,ce,unix,mac) |
div | div.click() | IE4.0(win16,win32,ce,unix,mac) |
dl | dl.click() | IE4.0(win16,win32,ce,unix,mac) |
dt | dt.click() | IE4.0(win16,win32,ce,unix,mac) |
em | em.click() | IE4.0(win16,win32,ce,unix,mac) |
embed | embed.click() | IE4.0(win16,win32,ce,unix,mac) |
fieldSet | fieldSet.click() | IE4.0(win16,win32,ce,unix,mac) |
font | font.click() | IE4.0(win16,win32,ce,unix,mac) |
form | form.click() | IE4.0(win16,win32,ce,unix,mac) |
hn | hn.click() | IE4.0(win16,win32,ce,unix,mac) |
hr | hr.click() | IE4.0(win16,win32,ce,unix,mac) |
i | i.click() | IE4.0(win16,win32,ce,unix,mac) |
img | img.click() | IE4.0(win16,win32,ce,unix,mac) |
button | button.click() | IE3.02(win16,win32,mac),win4.0(ce,unix) |
checkbox | checkbox.click() | IE4.0(win16,win32,ce,unix,mac) |
FileUpload | FileUpload.click() | IE4.0(win16,win32,ce,unix,mac) |
image | image.click() | IE4.0(win16,win32,ce,unix,mac) |
password | password.click() | IE4.0(win16,win32,ce,unix,mac) |
radio | radio.click() | IE4.0(win16,win32,ce,unix,mac) |
reset | reset.click() | IE4.0(win16,win32,ce,unix,mac) |
submit | submit.click() | IE4.0(win16,win32,ce,unix,mac) |
text | text.click() | IE4.0(win16,win32,ce,unix,mac) |
kbd | kbd.click() | IE4.0(win16,win32,ce,unix,mac) |
label | label.click() | IE4.0(win16,win32,ce,unix,mac) |
legend | legend.click() | IE4.0(win16,win32,ce,unix,mac) |
li | li.click() | IE4.0(win16,win32,ce,unix,mac) |
listing | listing.click() | IE4.0(win16,win32,ce,unix,mac) |
map | map.click() | IE4.0(win16,win32,ce,unix,mac) |
marquee | marquee.click() | IE4.0(win16,win32,ce,unix,mac) |
menu | menu.click() | IE4.0(win16,win32,ce,unix,mac) |
noBR | noBR.click() | IE4.0(win16,win32,ce,unix,mac) |
Object | Object.click() | IE4.0(win16,win32,ce,unix,mac) |
ol | ol.click() | IE4.0(win16,win32,ce,unix,mac) |
Option | Option.click() | IE4.0(win16,win32,ce,unix,mac) |
p | p.click() | IE4.0(win16,win32,ce,unix,mac) |
plainText | plainText.click() | IE4.0(win16,win32,ce,unix,mac) |
pre | pre.click() | IE4.0(win16,win32,ce,unix,mac) |
s | s.click() | IE4.0(win16,win32,ce,unix,mac) |
samp | samp.click() | IE4.0(win16,win32,ce,unix,mac) |
select | select.click() | IE4.0(win16,win32,ce,unix,mac) |
small | small.click() | IE4.0(win16,win32,ce,unix,mac) |
span | span.click() | IE4.0(win16,win32,ce,unix,mac) |
strike | strike.click() | IE4.0(win16,win32,ce,unix,mac) |
strong | strong.click() | IE4.0(win16,win32,ce,unix,mac) |
sub | sub.click() | IE4.0(win16,win32,ce,unix,mac) |
sup | sup.click() | IE4.0(win16,win32,ce,unix,mac) |
table | table.click() | IE4.0(win16,win32,ce,unix,mac) |
tBody | tBody.click() | IE4.0(win16,win32,ce,unix,mac) |
td | td.click() | IE4.0(win16,win32,ce,unix,mac) |
textArea | textArea.click() | IE4.0(win16,win32,ce,unix,mac) |
tFoot | tFoot.click() | IE4.0(win16,win32,ce,unix,mac) |
th | th.click() | IE4.0(win16,win32,ce,unix,mac) |
tHead | tHead.click() | IE4.0(win16,win32,ce,unix,mac) |
tr | tr.click() | IE4.0(win16,win32,ce,unix,mac) |
tt | tt.click() | IE4.0(win16,win32,ce,unix,mac) |
u | u.click() | IE4.0(win16,win32,ce,unix,mac) |
ul | ul.click() | IE4.0(win16,win32,ce,unix,mac) |
var | var.click() | IE4.0(win16,win32,ce,unix,mac) |
xmp | xmp.click() | IE4.0(win16,win32,ce,unix,mac) |
이 메서드는 (영문)DOM1(W3C Document Object Model Level 1)에서 정의되었다.
![]() | click 메서드⇒ | ![]() | ![]() ![]() ![]() |
click 메서드로 개체에 초점을 주지 않는다.
체크박스에디폴트로는 개체에 초점을 주지만 click 메서드로는 초점을 주지 못한다.
<SCRIPT> function doClick1(){ chkObj.focus(); } function doClick2(){ chkObj.click(); } </SCRIPT> <SCRIPT for=chkObj event=onfocus>showA.innerHTML='체크박스가 초점을 받음!';</SCRIPT> <SCRIPT for=chkObj event=onblur>showA.innerHTML='체크박스가 초점을 받지 않음!';</SCRIPT> <P><SPAN class=method>click</SPAN> 메서드로 개체에 초점을 주지 않는다.</P> <INPUT type="checkbox" id=chkObj></INPUT> 체크박스에 <BUTTON onclick="doClick1()">초점을 준다.</BUTTON> <BUTTON onclick="doClick2()">초점을 주지 않는다.</BUTTON> <DIV id=showA style=margin-left:3em;color:blue></DIV>
![]() | click 메서드 | ⇒ | ![]() ![]() |
최종 수정: 06/01/2025 17:19:36 | ![]() All right reserved | 비정상적인 방식으로 프레임없이 페이지에 접속하면 자주 오류가 발생됩니다. 오류가 나면 정상적 접속으로 시도해 보세요. | http://koxo.com/lang/js/method/click.html |