Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
HTML 패널
회원가입 폼
아이디:
비밀번호:
비밀번호 확인:
이메일:
가입하기
JavaScript 패널 document.getElementById('signupForm').addEventListener('submit', function(e) { e.preventDefault(); // 폼 제출 방지 // 에러 메시지 초기화 document.querySelectorAll('.error').forEach(e => e.textContent = ''); let isValid = true; // 아이디 검증 (4자 이상) let username = document.getElementById('username').value; if (username.length < 4) { document.getElementById('usernameError').textContent = '아이디는 4자 이상이어야 합니다'; isValid = false; } // 비밀번호 검증 (8자 이상) let password = document.getElementById('password').value; if (password.length < 8) { document.getElementById('passwordError').textContent = '비밀번호는 8자 이상이어야 합니다'; isValid = false; } // 비밀번호 확인 let passwordConfirm = document.getElementById('passwordConfirm').value; if (password !== passwordConfirm) { document.getElementById('confirmError').textContent = '비밀번호가 일치하지 않습니다'; isValid = false; } // 이메일 검증 let email = document.getElementById('email').value; if (!email.includes('@')) { document.getElementById('emailError').textContent = '올바른 이메일 형식이 아닙니다'; isValid = false; } // 모든 검증 통과 if (isValid) { document.getElementById('result').textContent = '✅ 회원가입 성공!'; document.getElementById('result').style.color = 'green'; } }); CSS 패널 body { font-family: Arial, sans-serif; max-width: 400px; margin: 50px auto; padding: 20px; } form div { margin-bottom: 15px; } label { display: inline-block; width: 120px; font-weight: bold; } input { padding: 8px; width: 200px; border: 1px solid #ddd; } input:focus { border-color: #3498db; outline: none; } .error { display: block; color: red; font-size: 12px; margin-left: 120px; margin-top: 5px; } button { margin-left: 120px; padding: 10px 30px; background-color: #2ecc71; color: white; border: none; cursor: pointer; font-size: 16px; } button:hover { background-color: #27ae60; } #result { margin-top: 20px; font-size: 18px; font-weight: bold; text-align: center; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)