簡體   English   中英

mailto與Rails中的HTML問題

[英]mailto with HTML problems in Rails

在這里,我需要使用mailto(html)mail_to(rails)函數發送一封郵件。 但是問題在於郵件正文,如何使用mailto功能附加正文,我的意思是,當我單擊此Mail鏈接時,一個Gmail客戶端將打開,因此我需要在“客戶端正文”部分中獲取imageURL

<script type="text/javascript">
var **imageURL**;
function code (email) {

   imageURL = "https://chart.googleapis.com/chart?
   chs=150x150&cht=qr&chl=13&choe=UTF-
   8";
   $("#image_url").val(imageURL);
   $("#mailhere").html("<a class='btn btn-primary pull-left'
   href='mailto:"+email+"'>**Mail**</a>");
}


<div class="modal-footer" id="qr-code-footer">
 <a id="printme" href="#" class="btn btn-primary pull-left">Print</a>
  <div id="mailhere" class="span1">
  </div>  
</div>

謝謝

使用&body=Content

$("#mailhere").html("<a class='btn btn-primary pull-left' href='mailto:"+email+"&body=" + encodeURIComponent(imageURL) + "'>**Mail**</a>");

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM