From 8824afb494e5398bc0efcf5f7eb78782096fc90c Mon Sep 17 00:00:00 2001 From: A1lo Date: Fri, 18 Mar 2022 21:53:46 +0800 Subject: Replace marco `anch` with `` tag for `zh-CN` (#4668) * replace anch with tag `` * auto replace anch with scripts * fix: resolve some incorrect anchors * replace anch with markdown link in markdown files * sync with english version for `Properties` * fix: resolve some incorrect anchors * using `Specifications` marco to replace `` * fix: resolve some incorrect anchors * remove the `noteCard` and add a `h2` head * fix: resolve some incorrect anchors * remove the duplicated content * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * revert the content change and replace anch * revert the content change and replace anch * revert the content chang * fix: correct the `href` * revert content changes and replace the anch * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors --- files/zh-cn/web/api/response/redirected/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files/zh-cn/web/api/response') diff --git a/files/zh-cn/web/api/response/redirected/index.html b/files/zh-cn/web/api/response/redirected/index.html index ad43bb7596..276ec66daa 100644 --- a/files/zh-cn/web/api/response/redirected/index.html +++ b/files/zh-cn/web/api/response/redirected/index.html @@ -10,7 +10,7 @@ translation_of: Web/API/Response/redirected

{{domxref("Response")}} 接口中只读的 redirected 属性表明该响应是否为一个重定向的请求的结果.

-

依赖 redirected 过滤重定向很容易导致虚假的重定向阻止你的内容像预期一样生效. 因此, 当调用 {{domxref("GlobalFetch.fetch", "fetch()")}} 时你应该进行过滤操作. 详见下面 {{anch("禁用重定向")}} 的例子.

+

依赖 redirected 过滤重定向很容易导致虚假的重定向阻止你的内容像预期一样生效. 因此, 当调用 {{domxref("GlobalFetch.fetch", "fetch()")}} 时你应该进行过滤操作. 详见下面 禁用重定向 的例子.

语法

@@ -25,7 +25,7 @@ translation_of: Web/API/Response/redirected

检测重定向

-

检测某个响应是否来自一个重定向的请求就如同检测 {{domxref("Response")}} 对象中这个标识一样容易. 在下面的代码中, 当 fetch 操作引起了重定向, 一段文本信息会被插入到元素中. 但需要注意的是, 这不像下面 {{anch("禁用重定向")}} 所描述的当重定向不合法时全部阻止的行为一样安全.

+

检测某个响应是否来自一个重定向的请求就如同检测 {{domxref("Response")}} 对象中这个标识一样容易. 在下面的代码中, 当 fetch 操作引起了重定向, 一段文本信息会被插入到元素中. 但需要注意的是, 这不像下面 禁用重定向 所描述的当重定向不合法时全部阻止的行为一样安全.

fetch("awesome-picture.jpg").then(function(response) {
   let elem = document.getElementById("warning-message-box");
-- 
cgit v1.2.3-54-g00ecf