지정된 속성으로부터 표현식을 제거한다.
![]() | Script | [bVal=]object.removeExpression(sPropertyName) |
필수적인 요소이며, 표현식이 제거될 속성의 이름을 지정하는 문자열이다.
반환값 bVal은 성공적으로 표현식이 제거되었는가를 나타내는 부울값이다.
true | 표현식이 성공적으로 제거되었다. |
false | 표현식이 제거되지 않았다. |
지정된 속성으로부터 표현식이 제거된 후 속성값은 제거 전 최종적으로 표현식에 의하여 계산된 값이다. setExpression 메서드에 의하여 설정된 표현식을 제거하기 위하여, removeExpression 메서드를 사용한다.
다음 문법은 CSS 속성들(Cascading Style Sheets)과 속성들에서 표현식을 제거하는 방식을 보여준다.
object.removeExpression(sPropertyName)
object.style.removeExpression(sPropertyName)
개체 | script | IE |
---|---|---|
a | a.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
acronym | acronym.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
address | address.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
applet | applet.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
area | area.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
b | b.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
bdo | bdo.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
big | big.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
blockQuote | blockQuote.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
body | body.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
br | br.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
button | button.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
caption | caption.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
center | center.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
cite | cite.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
code | code.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
col | col.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
colGroup | colGroup.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
custom | custom.removeExpression(sPropertyName) | IE5(win32,unix),IE5.5(ce) |
dd | dd.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
del | del.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
dfn | dfn.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
dir | dir.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
div | div.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
dl | dl.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
dt | dt.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
em | em.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
embed | embed.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
fieldSet | fieldSet.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
font | font.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
form | form.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
hn | hn.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
hr | hr.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
i | i.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
iFrame | iFrame.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
img | img.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
button | button.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
checkbox | checkbox.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
FileUpload | FileUpload.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
hidden | hidden.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
image | image.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
password | password.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
radio | radio.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
reset | reset.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
submit | submit.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
text | text.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
ins | ins.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
kbd | kbd.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
label | label.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
legend | legend.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
li | li.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
listing | listing.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
marquee | marquee.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
menu | menu.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
noBR | noBR.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
Object | Object.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
ol | ol.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
Option | Option.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
p | p.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
pre | pre.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
q | q.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
rt | rt.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
ruby | ruby.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
runtimestyle | runtimestyle.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
s | s.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
samp | samp.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
select | select.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
small | small.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
span | span.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
strike | strike.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
strong | strong.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
style | style.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
sub | sub.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
sup | sup.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
table | table.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
tBody | tBody.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
td | td.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
textArea | textArea.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
tFoot | tFoot.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
th | th.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
tHead | tHead.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
tr | tr.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
tt | tt.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
u | u.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
ul | ul.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
var | var.removeExpression(sPropertyName) | IE5(win16,win32,unix,mac),IE5.5(ce) |
![]() | removeExpression 메서드⇒ | ![]() | ![]() ![]() ![]() |
setExpression 메서드와 removeExpression 메서드로 div박스의 width 속성 표현식을 설정하고, 제거하는 예제이다.
box1Obj <INPUT type=text id=box1Obj value=50 size=3 onchange="showLength.innerText=box3Obj.style.width">+ box2Obj <INPUT type=text id=box2Obj value=50 size=3 onchange="showLength.innerText=box3Obj.style.width"> : box2Obj.style.width <SPAN id=showLength></SPAN><BR> <DIV id=box3Obj style="background-color:blue"></DIV><BR> <SCRIPT> var sExpress,bVal; document.onlad=setexp(); function setexp(){ box3Obj.style.setExpression('width','eval(box1Obj.value)+eval(box2Obj.value)','jscript'); showLength.innerText=box3Obj.style.width; } function getexp(){ sExpress=box3Obj.style.getExpression('width'); str='청색 박스의 width의 표현식은 ' + sExpress + '이고,<BR>'; str+='이 width 속성은 값 ' + box3Obj.style.width+'을 갖는다.'; showA.innerHTML=str; showLength.innerText=box3Obj.style.width; } function remexp(){ bVal=box3Obj.style.removeExpression('width'); showA.innerHTML='표현식이 제거되었나? '+bVal; } </SCRIPT> <INPUT type=button id=Button1 value="표현식 내용" onclick="getexp()"> <INPUT type=button id=Button2 value="표션식 제거" onclick="remexp()"> <INPUT type=button id=Button3 value="표현식 생성" onclick="setexp()"><BR> <DIV id=showA>결과 표시창</DIV>