<html>
<head>
<script>
function e(){
a.value="";
b.value="";
}
function f(){
b.value=a.value;
}
</script>
</head>
<body>
<input type="text" value="" id="a">
<input type="text" value="" id="b"><br>
<input type="button" value="지우기" id="c" onclick="e()">
<input type="button" value="복사" id="d" onclick="f()">
</body>
</html>
'개발하자 > 자바스크립트' 카테고리의 다른 글
테두리 바꾸기(borderStyle) (0) | 2015.02.07 |
---|---|
focus() (0) | 2015.02.07 |
배열사용 (0) | 2015.02.07 |
주석 (0) | 2015.02.07 |
1~100까지 10X10칸만들기(5의 배수표시) (0) | 2015.02.05 |