개발하자/자바스크립트
html onclick 이벤트
i구야
2015. 2. 5. 12:30
<html>
<head>
<style type="text/css">
</style>
<script>
function a(){
b1.value="홍길동"
}
function b(){
b2.value="구민정"
}
</script>
</head>
<body>
<input type="button" value="aa" id="b1" onclick=a()>
<input type="button" value="bb" id="b2" onclick=b()>
</body>
</html>