2010-11-03 45 views
0
<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
<h:commandButton value="Send Mail to dataprod.com" 
    action="#{ContactUs.sendMail}" styleClass="button" 
    onclick="setTimeout('history.go(-1)', 3000);"/> 
+0

您好實際上它將會進入初始頁面,但是我想回到之前的這裏,我在顯示成功頁面之後發送郵件後顯示成功頁面,它必須回到郵件發送頁面。 PLZ幫助我 – 2010-11-03 11:26:10

0

把元刷新頭在結果頁面的HTML頭。

<meta http-equiv="refresh" content="3;url=profile_contactus.faces" /> 

它會在3秒後轉到profile_contactus.faces