如何在jsf中延迟一段时间后转到上一页 函数goBack(){ setTimeout(函数previous() {location.href=“/dataprod/application/myprofile/profile\u contactus.faces”; }, 3000); }

如何在jsf中延迟一段时间后转到上一页 函数goBack(){ setTimeout(函数previous() {location.href=“/dataprod/application/myprofile/profile\u contactus.faces”; }, 3000); },jsf,Jsf,在结果页面的HTML标题中放置一个元刷新标题 <h:commandButton value="Send Mail to dataprod.com" action="#{ContactUs.sendMail}" styleClass="button" onclick="setTimeout('history.go(-1)', 3000);"/> 它将在3秒钟后转到profile\u contactus.faces。您好,实际上它将转到初始页,但我想回到上一页。在

在结果页面的HTML标题中放置一个元刷新标题

<h:commandButton value="Send Mail to dataprod.com"
    action="#{ContactUs.sendMail}" styleClass="button" 
    onclick="setTimeout('history.go(-1)', 3000);"/>


它将在3秒钟后转到
profile\u contactus.faces

您好,实际上它将转到初始页,但我想回到上一页。在发送邮件后,我将显示一个成功页面。在显示成功页面后,它必须返回邮件发送页面。请帮帮我
<h:commandButton value="Send Mail to dataprod.com"
    action="#{ContactUs.sendMail}" styleClass="button" 
    onclick="setTimeout('history.go(-1)', 3000);"/>
<meta http-equiv="refresh" content="3;url=profile_contactus.faces" />