<script type="text/javascript">
function goBack(){
setTimeout(function previous()
{ location.href="/dataprod/application/myprofile/profile_contactus.faces";
}, 3000);
}
</script>
<html>
<h:commandButton value="Send Mail to dataprod.com"
action="#{ContactUs.sendMail}" styleClass="button" onClick="goBack()"/>
答案 0 :(得分:0)
<h:commandButton value="Send Mail to dataprod.com"
action="#{ContactUs.sendMail}" styleClass="button"
onclick="setTimeout('history.go(-1)', 3000);"/>
答案 1 :(得分:0)
将元刷新标题放在结果页的HTML头中。
<meta http-equiv="refresh" content="3;url=profile_contactus.faces" />
3秒后它将转到profile_contactus.faces
。