【问题标题】:Email Function does not work in HTML page电子邮件功能在 HTML 页面中不起作用
【发布时间】:2014-09-19 05:36:57
【问题描述】:

当移动到第二页并返回第一页时,我有两个具有电子邮件功能的页面,电子邮件不起作用。但是,如果我们是第一次在第一页并单击电子邮件按钮,电子邮件就可以正常工作。知道如何解决这个问题。

第一页

<!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>

【问题讨论】:

    标签: javascript html titanium


    【解决方案1】:

    请提交电子邮件,转到第 2 页然后返回(返回时刷新页面然后尝试提交 - 如果可行,则可能需要添加)

    $().ready(function() {
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-14
      • 1970-01-01
      • 1970-01-01
      • 2013-05-31
      • 1970-01-01
      • 2020-11-04
      相关资源
      最近更新 更多