aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/javascript/reference/global_objects/string/fixed
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/javascript/reference/global_objects/string/fixed')
-rw-r--r--files/pt-br/web/javascript/reference/global_objects/string/fixed/index.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/files/pt-br/web/javascript/reference/global_objects/string/fixed/index.html b/files/pt-br/web/javascript/reference/global_objects/string/fixed/index.html
new file mode 100644
index 0000000000..4a6004f05d
--- /dev/null
+++ b/files/pt-br/web/javascript/reference/global_objects/string/fixed/index.html
@@ -0,0 +1,66 @@
+---
+title: String.prototype.fixed()
+slug: Web/JavaScript/Reference/Global_Objects/String/fixed
+tags:
+ - Descontinuado
+ - JavaScript
+ - Prototipo
+ - Referencia
+ - String
+ - fixed()
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/String/fixed
+---
+<div>{{JSRef}} {{deprecated_header}}</div>
+
+<p>O método <strong><code>fixed()</code></strong> cria um elemento HTML <code><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/tt" title="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/tt">&lt;tt&gt;</a></code> que faz com que uma string seja exibida em uma fonte de densidade fixa.</p>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox notranslate"><code><var>str</var>.fixed()</code></pre>
+
+<h3 id="Valor_retornado">Valor retornado</h3>
+
+<p>Uma string que representa o elemento HTML <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/tt" title="https://wiki.developer.mozilla.org/en-US/docs/Web/HTML/Element/tt">&lt;tt&gt;</a>.</p>
+
+<h2 id="Descrição">Descrição</h2>
+
+<p>O método<strong> </strong><code>fixed()</code> cria uma string dentro de uma tag <code>&lt;tt&gt;</code>:<br>
+ <code>"&lt;tt&gt;str&lt;/tt&gt;"</code>.</p>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<h3 id="Usando_fixed">Usando <code>fixed()</code></h3>
+
+<p>O exemplo a seguir usa o método <code>fixed()</code> para alterar a formatação de uma string:</p>
+
+<pre class="brush: js notranslate">var worldString = 'Olá, mundo';
+console.log(worldString.fixed()); // "&lt;tt&gt;Olá, mundo&lt;/tt&gt;"
+</pre>
+
+<h2 id="Especificações">Especificações</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-string.prototype.fixed', 'String.prototype.fixed')}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Navegadores_compatíveis">Navegadores compatíveis</h2>
+
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("javascript.builtins.String.fixed")}}</p>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li>{{jsxref("String.prototype.bold()")}}</li>
+ <li>{{jsxref("String.prototype.italics()")}}</li>
+ <li>{{jsxref("String.prototype.strike()")}}</li>
+</ul>