我不是在问如何使用它。我知道如何使用它。
但是当 apply 调用调用它的函数时,它究竟是如何将一个参数数组传递给一个没有写入参数数组的函数呢?它是否将其给定的参数数组与被调用的函数“参数”组合在一起?
我查看了 .apply 和 .call 的最新 ECMAscript 规范,但我并没有真正看到有关底层逻辑的任何内容。
欢迎任何解释。我是 JavaScript 新手,想更好地了解幕后发生的事情。我目前正在尝试自己重新创建一些基本功能,而这个功能给我带来了很多麻烦。
我已经在下面创建了此电子邮件布局,但我一生都无法弄清楚为什么Gmail可以正确呈现它,但是Inbox却可怕地呈现了它。
经过检查,出于某种原因将一堆东西分成自己的表元素。有人看到我想念的东西。我对于使用html收发电子邮件非常陌生,并且对它的糟糕程度不断感到震惊。
<body style="margin:0; padding:0; width:100% !important; font-family: verdana;">
<table width="100%" bgcolor="#F7F7F7" cellpadding="0" cellspacing="0" border="0" id="backgroundTable" align="center">
<tr>
<td>
<table cellpadding="20" cellspacing="0" border="0" align="center">
<tr>
<td valign="top" align="center"><span style="color: rgb(44, 160, 209); font-size: 24px; font-family: verdana;">shift</span><span style="color: rgb(235, 42, 83); font-size: 24px; font-family: verdana; font-weight: bold;">Swap</span></td>
</tr>
</table>
</td>
</tr>
<!-- This is where your content goes bro -->
<tr>
<td>
<table width="600" bgcolor="#FFF" align="center" style="border-radius:8px;">
<tr>
<td style="padding: 35px;">
<h3>
Welcome <span style="text-decoration: none;"><%= @email %></span>!
</h3>
<div>
<span …Run Code Online (Sandbox Code Playgroud)