pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/fixed

ttps://developer.mozilla.org/favicon.svg" />

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

String.prototype.fixed()

지원이 중단되었습니다: 이 기능은 더 이상 권장되지 않습니다. 일부 브라우저에서는 아직 지원할 수 있지만 관련 웹 표준에서 이미 제거되었거나 제거 과정에 있는 경우가 있으며, 호환성을 위해 유지되고 있을 수 있습니다. 사용을 피하고 가능하다면 기존 코드를 업데이트하세요. 결정을 지원할 하단의 호환성 표를 확인하세요. 이 기능은 언제든지 작동을 중단할 수 있음을 유의하세요.

String 값의 fixed() 메서드는 해당 문자열을 고정폭 글꼴로 표시하게 만드는 <tt> 요소(<tt>str</tt>)에 해당 문자열을 집어넣은 문자열을 생성합니다.

참고 : 모든 HTML 래퍼 메서드는 더 이상 사용되지 않으며 호환성 목적으로만 표준화되었습니다. fixed()의 경우에선 <tt> 요소 자체는 HTML 명세서에서 제거되었기 때문에 더 이상 사용해서는 안됩니다. 웹 개발자는 반드시 대신 CSS 속성을 사용하시기 바랍니다.

구문

js
fixed()

매개변수

없음.

반환 값

<tt> 시작 태그로 시작하는 문자열, 그 다음 str 내용, 그 다음 </tt> 끝 태그로 끝나는 문자열입니다.

예제

fixed() 사용하기

아래 코드는 HTML 문자열을 생성한 다음 document의 body를 해당 문자열로 대체합니다.

js
const contentString = "Hello, world";

document.body.innerHTML = contentString.fixed();

이는 다음 HTML을 생성합니다.

html
<tt>Hello, world</tt>

경고 : tt가 더 이상 유효한 요소가 아니기 때문에 이 마크업은 유효하지 않습니다.

fixed()를 사용하여 HTML 텍스트를 직접 작성하는 대신 반드시 CSS를 사용해서 폰트를 조작해야 합니다. 예를 들어 element.style 속성의

명세서

Specification
ECMAScript® 2026 Language Specification
# sec-string.prototype.fixed

브라우저 호환성

같이 보기

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy