diff options
| author | Irvin <irvinfly@gmail.com> | 2022-02-16 02:03:27 +0800 |
|---|---|---|
| committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
| commit | 012ee621791b6895e637f96e6523027951768f25 (patch) | |
| tree | 29cfacc0d5092af45870dcc74f22feb8b2664fbf /files/zh-cn/web/javascript/reference/global_objects/error | |
| parent | ba91b017421b001cd226135612a7bd5dfcd88904 (diff) | |
| download | translated-content-012ee621791b6895e637f96e6523027951768f25.tar.gz translated-content-012ee621791b6895e637f96e6523027951768f25.tar.bz2 translated-content-012ee621791b6895e637f96e6523027951768f25.zip | |
remove inline style for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/error')
3 files changed, 58 insertions, 58 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/error/index.html b/files/zh-cn/web/javascript/reference/global_objects/error/index.html index b9334c7969..fe9ad2deed 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/error/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/error/index.html @@ -49,37 +49,37 @@ const y = new Error('I was constructed via the "new" keyword!');</code></pre> <h3 id="Error_types" name="Error_types">Error 类型</h3> -<p>除了通用的Error构造函数外,JavaScript还有6个其他类型的错误构造函数。更多客户端异常,详见 <a href="/en/JavaScript/Guide/Statements#Exception_Handling_Statements" style="line-height: inherit;" title="en/JavaScript/Guide/Statements#Exception Handling Statements">Exception Handling Statements</a>。</p> +<p>除了通用的Error构造函数外,JavaScript还有6个其他类型的错误构造函数。更多客户端异常,详见 <a href="/en/JavaScript/Guide/Statements#Exception_Handling_Statements" title="en/JavaScript/Guide/Statements#Exception Handling Statements">Exception Handling Statements</a>。</p> <dl> - <dt><strong style="font-weight: bold;">{{jsxref("EvalError")}}</strong></dt> + <dt><strong>{{jsxref("EvalError")}}</strong></dt> <dd>创建一个error实例,表示错误的原因:与 {{jsxref("Global_Objects/eval", "eval()")}} 有关。</dd> - <dt><strong style="font-weight: bold;">{{jsxref("InternalError")}} {{non-standard_inline}}</strong></dt> + <dt><strong>{{jsxref("InternalError")}} {{non-standard_inline}}</strong></dt> <dd>创建一个代表Javascript引擎内部错误的异常抛出的实例。 如: "递归太多".</dd> </dl> <dl> - <dt><strong style="font-weight: bold;">{{jsxref("RangeError", "RangeError")}}</strong></dt> + <dt><strong>{{jsxref("RangeError", "RangeError")}}</strong></dt> <dd>创建一个error实例,表示错误的原因:数值变量或参数超出其有效范围。</dd> </dl> <dl> - <dt><strong style="font-weight: bold;">{{jsxref("ReferenceError")}}</strong></dt> + <dt><strong>{{jsxref("ReferenceError")}}</strong></dt> <dd>创建一个error实例,表示错误的原因:无效引用。</dd> </dl> <dl> - <dt><strong style="font-weight: bold;">{{jsxref("SyntaxError")}}</strong></dt> + <dt><strong>{{jsxref("SyntaxError")}}</strong></dt> <dd>创建一个error实例,表示错误的原因:{{jsxref("Global_Objects/eval", "eval()")}}在解析代码的过程中发生的语法错误。</dd> </dl> <dl> - <dt><strong style="font-weight: bold;">{{jsxref("TypeError")}}</strong></dt> + <dt><strong>{{jsxref("TypeError")}}</strong></dt> <dd>创建一个error实例,表示错误的原因:变量或参数不属于有效类型。</dd> </dl> <dl> - <dt><strong style="font-weight: bold;">{{jsxref("URIError")}}</strong></dt> + <dt><strong>{{jsxref("URIError")}}</strong></dt> <dd>创建一个error实例,表示错误的原因:给 {{jsxref("Global_Objects/encodeURI", "encodeURI()")}}或 {{jsxref("Global_Objects/decodeURI", "decodeURI()")}}传递的参数无效。</dd> </dl> @@ -141,7 +141,7 @@ const y = new Error('I was constructed via the "new" keyword!');</code></pre> <p>你可能希望自定义基于Error的异常类型,使得你能够 throw new MyError() 并可以使用 <code>instanceof MyError</code> 来检查某个异常的类型. 这种需求的通用解决方法如下.</p> -<div class="warning" style="font-size: 14px;"> +<div class="warning"> <p>注意,在FireFox中抛出自定义类型的异常会显示不正确的行号和文件名。</p> </div> @@ -170,49 +170,49 @@ try { console.log(e.message); // 'custom message' }</pre> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 0px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 19px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 38px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 57px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 76px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 95px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 114px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 133px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 152px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 171px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 190px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 209px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 228px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 247px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 266px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 285px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 304px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 323px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 342px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 361px; background: 0px 0px;"></div> +<div class="line-number"></div> -<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 380px; background: 0px 0px;"></div> +<div class="line-number"></div> -<h2 id="规范" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">规范</h2> +<h2 id="规范">规范</h2> <table class="standard-table"> <tbody> @@ -244,11 +244,11 @@ try { </tbody> </table> -<h2 id="浏览器兼容性" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">浏览器兼容性</h2> +<h2 id="浏览器兼容性">浏览器兼容性</h2> <div>{{Compat("javascript.builtins.Error")}}</div> -<h2 id="See_also" name="See_also" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">相关链接</h2> +<h2 id="See_also" name="See_also">相关链接</h2> <ul> <li>{{jsxref("Error.prototype")}}</li> diff --git a/files/zh-cn/web/javascript/reference/global_objects/error/name/index.html b/files/zh-cn/web/javascript/reference/global_objects/error/name/index.html index 4d24a6f972..0903c6e059 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/error/name/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/error/name/index.html @@ -7,7 +7,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Error/name <h2 id="Summary" name="Summary">概述</h2> -<p><code style="font-style: normal; line-height: 19.0909080505371px;"><strong>name</strong></code> 属性表示error类型的名称.初始值为"Error".</p> +<p><code><strong>name</strong></code> 属性表示error类型的名称.初始值为"Error".</p> <h2 id="Description" name="Description">描述</h2> @@ -23,9 +23,9 @@ e.name = "ParseError"; // 修改之后,e.toString()会成为下 throw e; // "ParseError: Malformed input" </pre> -<h2 id="规范" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">规范</h2> +<h2 id="规范">规范</h2> -<table class="standard-table" style="line-height: 19.0909080505371px;"> +<table class="standard-table"> <tbody> <tr> <th scope="col">Specification</th> @@ -50,20 +50,20 @@ throw e; // "ParseError: Malformed input" </tbody> </table> -<h2 id="浏览器兼容性" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">浏览器兼容性</h2> +<h2 id="浏览器兼容性">浏览器兼容性</h2> -<div style="line-height: 19.0909080505371px;">{{CompatibilityTable}}</div> +<div>{{CompatibilityTable}}</div> -<div style="line-height: 19.0909080505371px;"> -<table class="compat-table" style="border-color: transparent;"> +<div> +<table class="compat-table"> <tbody> <tr> - <th style="line-height: 16px;">Feature</th> - <th style="line-height: 16px;">Chrome</th> - <th style="line-height: 16px;">Firefox (Gecko)</th> - <th style="line-height: 16px;">Internet Explorer</th> - <th style="line-height: 16px;">Opera</th> - <th style="line-height: 16px;">Safari</th> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> </tr> <tr> <td>Basic support</td> @@ -77,17 +77,17 @@ throw e; // "ParseError: Malformed input" </table> </div> -<div style="line-height: 19.0909080505371px;"> -<table class="compat-table" style="border-color: transparent;"> +<div> +<table class="compat-table"> <tbody> <tr> - <th style="line-height: 16px;">Feature</th> - <th style="line-height: 16px;">Android</th> - <th style="line-height: 16px;">Chrome for Android</th> - <th style="line-height: 16px;">Firefox Mobile (Gecko)</th> - <th style="line-height: 16px;">IE Mobile</th> - <th style="line-height: 16px;">Opera Mobile</th> - <th style="line-height: 16px;">Safari Mobile</th> + <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> @@ -102,9 +102,9 @@ throw e; // "ParseError: Malformed input" </table> </div> -<h2 id="See_also" name="See_also" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">相关链接</h2> +<h2 id="See_also" name="See_also">相关链接</h2> -<ul style="line-height: 19.0909080505371px;"> +<ul> <li>{{jsxref("Error.prototype.message")}}</li> <li>{{jsxref("Error.prototype.toString()")}}</li> </ul> diff --git a/files/zh-cn/web/javascript/reference/global_objects/error/stack/index.html b/files/zh-cn/web/javascript/reference/global_objects/error/stack/index.html index 0406826e77..53daa6aba0 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/error/stack/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/error/stack/index.html @@ -100,7 +100,7 @@ try { // @file:///C:/example.html:7:6 </pre> -<p>你也可以使用<code>//# sourceURL</code> 命名eval源的指令。 也可以查看在 <a href="/en-US/docs/Tools/Debugger">Debugger</a>文档中的<a href="/en-US/docs/Tools/Debugger/How_to/Debug_eval_sources" style="">Debug eval 源</a>和<a href="http://fitzgeraldnick.com/weblog/59/">blog post博客 。</a></p> +<p>你也可以使用<code>//# sourceURL</code> 命名eval源的指令。 也可以查看在 <a href="/en-US/docs/Tools/Debugger">Debugger</a>文档中的<a href="/en-US/docs/Tools/Debugger/How_to/Debug_eval_sources">Debug eval 源</a>和<a href="http://fitzgeraldnick.com/weblog/59/">blog post博客 。</a></p> <h2 id="规范">规范</h2> |
