gpt4 book ai didi

php - 将弹出窗口 'email has been sent' 更改为 Bootstrap 'contextual background'?

转载 作者:行者123 更新时间:2023-11-28 07:51:30 25 4
gpt4 key购买 nike

我的网站上有一个弹出窗口,让用户知道电子邮件已发送。

我想通过 bootstrap 将其更改为更好的消息(网站由 bootstrap 制作)

我想要一个上下文背景,而不是弹出消息。您可以在这里看到它们:上下文背景 http://getbootstrap.com/css/#helper-classes

这是弹出代码的样子。

if(wp_mail($to, $subject, $msg, $headers, $attachments)) { echo 'The message was sent. Check your email inbox.'; } else { echo 'The message was not sent!'; }; enter code here

我需要做什么来改变它?

最佳答案

您可以使用 PHP 回显 html 代码:

if(wp_mail($to, $subject, $msg, $headers, $attachments)) { 
echo '<p class="bg-success">The message was sent. Check your email inbox.</p>';
}
else {
echo '<p class="bg-danger">The message was not sent!</p>'; };
}

关于php - 将弹出窗口 'email has been sent' 更改为 Bootstrap 'contextual background'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30384979/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com