From 5b7f3c409c6de2a4d529ed41bcf14b64265b6a4d Mon Sep 17 00:00:00 2001 From: rlcz1 Date: Sun, 24 Mar 2024 21:16:22 +0900 Subject: [PATCH] feat: user info management system --- src/app.js | 37 +++++++++++++++++++++++++++++++++++++ src/pages/index.html | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 src/app.js diff --git a/src/app.js b/src/app.js new file mode 100644 index 0000000..d1c66a5 --- /dev/null +++ b/src/app.js @@ -0,0 +1,37 @@ +class User { + constructor(name, age, email) { + this.name = name; + this.age = age; + this.email = email; + } + + getName() { + return `이름: ${this.name}`; + } + + getAge() { + return `나이: ${this.age}`; + } + + getEmail() { + return `이메일: ${this.email}`; + } +} + +$(document).ready(() => { + $("#submit").on("click", (e) => { + const name = $("#name").val(); + const age = $("#age").val(); + const email = $("#email").val(); + + const user = new User(name, age, email); + + $("#user_name").text(user.getName()); + $("#user_age").text(user.getAge()); + $("#user_email").text(user.getEmail()); + }); + + $("#view").on("click", (e) => { + $("#user_info").show(); + }); +}); \ No newline at end of file diff --git a/src/pages/index.html b/src/pages/index.html index 1b1a79b..d6d2bab 100644 --- a/src/pages/index.html +++ b/src/pages/index.html @@ -4,8 +4,44 @@ - Document + 사용자 정보 관리 시스템 + + +
+

사용자 정보 관리 시스템

+
+ 이름 + +
+
+ 나이 + +
+
+ 이메일 + +
+
+ +
+
+ +
+
+ + \ No newline at end of file