[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/String/fixed [Back]  [Original]

String.prototype.fixed() - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

String.prototype.fixed()

HTML wrapper methods exist only for backwards compatibility. Use DOM APIs to create elements instead.

DOM

fixed() String <tt> (<tt>str</tt>)

: HTML fixed() <tt> HTML CSS

js
fixed()

<tt> str </tt>

fixed()

HTML

js
const contentString = "Hello, world";

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

HTML

html
<tt>Hello, world</tt>

: tt

fixed() HTML CSS element.style font-family

js
document.getElementById("yourElemId").style.fontFamily = "monospace";

ECMAScript 2027 LanguageSpecification
# sec-string.prototype.fixed


Web Proxy Viewer  |  New URL  |  Original Page