코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>JavaScript String Method</title> </head> <body> <h1>문자열의 대소문자 변환</h1> <script> var str = "JavaScript"; document.write(str.toUpperCase() + "<br>"); // JAVASCRIPT document.write(str.toLowerCase()); // javacript </script> </body> </html>