2014-09-19 70 views
0

當移動到第二頁並返回到第一頁電子郵件不起作用時,我有兩個帶電子郵件功能的頁面。但如果我們是第一次在第一頁,並點擊電子郵件按鈕電子郵件工作正常。任何想法如何解決這個問題。電子郵件功能在HTML頁面不起作用

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
     <title>Untitled Document</title> 
    </head> 
    <body> 

    <button onclick="sendMailOne()" >Press to send mail</button> 
    <a href="secondPage.html"><h1>Go to second Page</h1></a> 


    <script type="text/javascript"> 


     function sendMailOne(){ 
      alert("Sending mail . . . . ."); 
      Titanium.App.fireEvent("sendEmail",{ 
      "toEmail": "", 
      "toName": "", 
      "subject": "Test Subject", 
      'isHTML':true, 
      "body": "Send tdhe mail . . .. . . ", 
      }); 
     } 
    </script> 
    </body> 
</html> 

這裏是第二頁,當我們從頁面移動到這一點,並回到第一頁的電子郵件不起作用。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
     <title>Untitled Document</title> 
    </head> 

    <body> 
     <h1>In second Page</h1> 
     <a href="index.html"><h1>Go Back</h1></a> 
    </body> 
</html> 

回答

0

請提交的電子郵件,請前往2頁,然後回去(當你回到刷新頁面,然後嘗試呈交其是否工作正常,那麼你可能需要添加)

$().ready(function() {