개발하자/자바스크립트
지우기,복사
i구야
2015. 2. 7. 11:37
<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>