string.length
ex)'abc'.length
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>JavaScript</title>
<style>
body {
font-family: Consolas, monospace;
}
</style>
</head>
<body>
<script>
document.write( '<p>"1234".length : ' + '1234'.length + '</p>' );
document.write( '<p>"".length : ' + ''.length + '</p>' );
document.write( '<p>"한글".length : ' + '한글'.length + '</p>' );
</script>
</body>
</html>
'study' 카테고리의 다른 글
php 파일 업로드 php file upload (0) | 2019.07.14 |
---|---|
jquery checkbox 체크박스 제이쿼리 (0) | 2019.07.13 |
[제이쿼리][자바스크립트] 영문만, 숫자만, 한글만 입력. (0) | 2019.07.13 |
숫자만 입력 인풋박스 input text number only (0) | 2019.07.13 |
PHP header를 UTF-8로 설정하기 (0) | 2019.07.13 |