본문 바로가기

IT노트(구)/JavaScript

자바스크립트를 이용해서 input type=hidden을 text로 바꾸기

자바스크립트를 이용하면

hidden을 text로 바꿀 수 있다!

그냥 type을 바꾸면 된다.

다음과 같이 처리할 수 있다!



<input
type="hidden" id="foo" value="안녕하세요."
/>

<script
>
var f = document.getElementById("foo"
);
f.type= "text"
;
</script>