有没有办法在现有的(大多数浏览器支持的)HTTP 请求中编写 fetch {mode: 'no-cors'} ?例如,我想知道是否可以翻译以下内容:
fetch(url, { mode: 'no-cors'})
.then(function (response) {
console.log(response);
});
Run Code Online (Sandbox Code Playgroud)
转换成某种 XMLHttpRequest 或 Ajax。我尝试了几种方法,但它们的行为有所不同 - 我只想要 fetch 返回的不透明响应。
谢谢!
我正在使用http://www.jquery-steps.com/Examples#basic进行在线测验工具,并想知道是否可以使用链接或按钮触发我在粘贴的演示中看到的单击标签事件.
HTML:
<section id="basic">
<h2 class="page-header">Basic Example</h2>
<div id="wizard-1">
<h3>Keyboard</h3>
<section>
<p>Try the keyboard navigation by clicking arrow left or right!</p>
</section>
<h3>Effects</h3>
<section>
<p>Wonderful transition effects.</p>
</section>
<h3>Pager</h3>
<section>
<p>The next and previous buttons help you to navigate through your content.</p>
</section>
</div>
</section>
Run Code Online (Sandbox Code Playgroud)
JS:
$("#wizard-1").steps({
headerTag: "h3",
bodyTag: "section",
transitionEffect: "slideLeft",
autoFocus: true
});
Run Code Online (Sandbox Code Playgroud)
如果您将标题/标签悬停,则会看到附加到它们的锚点.我想做的是调用锚点(即下面)并使用tab功能,就像我单击了选项卡本身一样.
<a href="#wizard-1-h-2">Step 3 or Pager</a>
Run Code Online (Sandbox Code Playgroud)
JSFiddle:http://jsfiddle.net/fXF6k/1/
谢谢!