aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/javascript/reference/global_objects/string
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-tw/web/javascript/reference/global_objects/string')
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/string/index.html10
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html58
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html16
3 files changed, 17 insertions, 67 deletions
diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/index.html
index e29b6b8cea..2c9e419b04 100644
--- a/files/zh-tw/web/javascript/reference/global_objects/string/index.html
+++ b/files/zh-tw/web/javascript/reference/global_objects/string/index.html
@@ -105,8 +105,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String
<dl>
</dl>
-<div class="note">
-<p>和其他語言不同,JavaScript 將單引號字串和雙引號字串是做相同;因此,上述的序列可以在單引號或雙引號中作用。</p>
+<div class="notecard note">
+<p><strong>備註:</strong>和其他語言不同,JavaScript 將單引號字串和雙引號字串是做相同;因此,上述的序列可以在單引號或雙引號中作用。</p>
</div>
<dl>
@@ -192,7 +192,7 @@ console.log(eval(s2)); // 回傳字串 "2 + 2"
<pre class="brush: js">console.log(eval(s2.valueOf())); // 回傳數字 4
</pre>
-<div class="note"><strong>注意:</strong> 對於在 JavaScript 中其他可用的字串方法,請參閱這篇文章<a href="/en-US/docs/Web/JavaScript/Typed_arrays/StringView" title="/en-US/docs/Web/JavaScript/Typed_arrays/StringView"><code>StringView</code> – a C-like representation of strings based on typed arrays</a>。</div>
+<div class="notecard note"><p><strong>備註:</strong>對於在 JavaScript 中其他可用的字串方法,請參閱這篇文章<a href="/en-US/docs/Web/JavaScript/Typed_arrays/StringView" title="/en-US/docs/Web/JavaScript/Typed_arrays/StringView"><code>StringView</code> – a C-like representation of strings based on typed arrays</a>。</p></div>
<h2 id="Properties">屬性</h2>
@@ -216,8 +216,8 @@ console.log(eval(s2)); // 回傳字串 "2 + 2"
<h2 id="String_通用方法"><code>String</code> 通用方法</h2>
-<div class="warning">
-<p>字串通用方法是非標準化的、被棄用的,也有近期將被刪除的。</p>
+<div class="notecard warning">
+<p><strong>警告:</strong>字串通用方法是非標準化的、被棄用的,也有近期將被刪除的。</p>
</div>
<p>The <code>String </code>instance methods are also available in Firefox as of JavaScript 1.6 (though not part of the ECMAScript standard) on the String object for applying String methods to any object:</p>
diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html
index bb053cd10a..e61013fb77 100644
--- a/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html
+++ b/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html
@@ -31,63 +31,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/padStart
'abc'.padStart(6,"123465"); // "123abc"
</pre>
-<h2 id="Specifications">Specifications</h2>
+<h2 id="規範">規範</h2>
-<p>這個方法還沒有被納入 ECMAScript 標準。現在還只是個<a href="https://github.com/tc39/proposal-string-pad-start-end">提案</a>。</p>
+{{Specifications}}
-<h2 id="Browser_compatibility">Browser compatibility</h2>
+<h2 id="瀏覽器相容性">瀏覽器相容性</h2>
-<div>{{CompatibilityTable}}</div>
-
-<div>
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Edge</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatChrome(57)}} </td>
- <td>15</td>
- <td>{{CompatGeckoDesktop(51)}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatOpera(44)}}</td>
- <td>{{CompatSafari(10)}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div>
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatChrome(57)}}</td>
- <td>{{CompatGeckoMobile(51)}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatSafari(10)}}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat}}
<h2 id="See_also">See also</h2>
diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html
index 1cc9b1abac..b40013644c 100644
--- a/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html
+++ b/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html
@@ -7,8 +7,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace
<p><strong><code>replace()</code></strong> 方法會傳回一個新字串,此新字串是透過將原字串與 <code>pattern</code> 比對,以 <code>replacement</code> 取代吻合處而生成。<code>pattern</code> 可以是字串或 {{jsxref("RegExp")}},而 <code>replacement</code> 可以是字串或函式(會在每一次匹配時被呼叫)。</p>
-<div class="note">
-<p>備註:原始的字串會保持不變。</p>
+<div class="notecard note">
+<p><strong>備註:</strong>原始的字串會保持不變。</p>
</div>
<h2 id="語法">語法</h2>
@@ -42,11 +42,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace
<p>The replacement string can include the following special replacement patterns:</p>
-<table class="fullwidth-table">
+<table>
<tbody>
<tr>
- <td class="header">Pattern</td>
- <td class="header">Inserts</td>
+ <th>Pattern</th>
+ <th>Inserts</th>
</tr>
<tr>
<td><code>$$</code></td>
@@ -77,11 +77,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace
<p>The arguments to the function are as follows:</p>
-<table class="fullwidth-table">
+<table>
<tbody>
<tr>
- <td class="header">Possible name</td>
- <td class="header">Supplied value</td>
+ <th>Possible name</th>
+ <th>Supplied value</th>
</tr>
<tr>
<td><code>match</code></td>