Date 객체λ₯Ό μ΄μš©ν•œ 디지털 μ‹œκ³„

Date 객체 let date = new Date(year, monthIndex, day, hours, minutes, seconds, milliseconds); getFullYear() : 4자리 β€˜μ—°λ„β€™ κ°’ λ°˜ν™˜ getMonth() : β€˜μ›”β€™ λ°˜ν™˜ 1μ›” = 0 (0~11) getDate() : β€˜μΌβ€™ λ°˜ν™˜ getDay() : β€˜μš”μΌβ€™ λ°˜ν™˜ 0 = μΌμš”μΌ ~ 6 = ν† μš”μΌ getHours() : β€˜μ‹œκ°„β€™ λ°˜ν™˜ getMinutes() / getSeconds() /... Continue reading...

Response λ‚΄λ €μ£ΌκΈ°

JSON λ‚΄λ €μ£ΌκΈ° text λ³΄λ‹€λŠ” JSON을 λ‚΄λ €μ£ΌλŠ” ν˜•νƒœλ₯Ό 제일 많이 μ‚¬μš© java > com.example.response_Test > controller > ApiController.java package com.example.response_test.controller; import com.example.response_test.dto.User; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/api") public class ApiController { // text > 거의 μ•ˆμ”€ γ…‹ @GetMapping("/text") public String text(@RequestParam String account){ return account; } // JSON... Continue reading...

[QUIZ][λ¦¬νŒ©ν† λ§] μ •κ·œν‘œν˜„μ‹μ„ μ΄μš©ν•œ ID / PW μœ νš¨μ„± 검사

μ •κ·œν‘œν˜„μ‹μ„ μ΄μš©ν•œ ID / PW μœ νš¨μ„± 검사 λ¦¬νŒ©ν† λ§ HTML (login.html) <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>둜그인</title> <link rel="stylesheet" href="style/style.css"> </head> <body> <div id="wrap"> <header id="header"> <div id="headerLogo"></div> </header> <!-- header#header --> <hr> <main id="main" class="flex-container"> <form id="loginForm"> <input type="text" id="uid" placeholder="아이디... Continue reading...

[QUIZ] μ •κ·œν‘œν˜„μ‹μ„ μ΄μš©ν•œ ID / PW μœ νš¨μ„± 검사

μ •κ·œν‘œν˜„μ‹μ„ μ΄μš©ν•œ ID / PW μœ νš¨μ„± 검사 HTML (login.html) <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Login</title> <link rel="stylesheet" href="style/style.css"> </head> <body> <div id="wrap"> <header id="header"> <div id="logo"> </div> </header> <!-- header#header --> <main id="main"> <div id="loginArea"> <!-- <form> --> <form name="loginForm" action="https://www.daum.net"... Continue reading...

μ •κ·œν‘œν˜„μ‹ (Regular Expression)

μ •κ·œν‘œν˜„μ‹ (Regular Expression) 정해진 문자의 νŒ¨ν„΄μ„ λ§Œλ“€ λ•Œ μ‚¬μš© let regExp = /νŒ¨ν„΄/ν”Œλž˜κ·Έ; μ •κ·œν‘œν˜„μ‹ 객체 λ©”μ„œλ“œ test() μ •κ·œν‘œν˜„μ‹κ³Ό μΌμΉ˜ν•˜λŠ” λ¬Έμžμ—΄μ΄ 있으면 true, μ—†μœΌλ©΄ false λ°˜ν™˜ ex) let reg = /Javascript/; console.log(reg.test('Javascript)); // true console.log(reg.test('Java)); // false μ •κ·œν‘œν˜„μ‹ 객체 ν”Œλž˜κ·Έ g λ¬Έμžμ—΄ 전체λ₯Ό μ •κ·œν‘œν˜„μ‹κ³Ό 비ꡐ μ •κ·œν‘œν˜„μ‹ 객체 νŒ¨ν„΄ [λ¬Έμžμ—΄] : λ¬Έμžμ—΄... Continue reading...