mailto函数在URL中显示所有内容

mailto function display all in URL

本文关键字:显示 函数 URL mailto      更新时间:2023-09-26

当我点击Mail按钮时,gmail客户端将打开,但问题是如何避免浏览器URL中的所有这些内容,所有这些主题、to、正文都将显示在URL中。如何避免这种情况?或者有什么安全问题?

<script type="text/javascript">
  var imageURL;
  function code (email,br) {
imagelink = "https://chart.googleapis.com/chart?
chs=250x250&cht=qr&chl=13&choe=UTF-8";
$("#image_url").val(imageURL);
$("#mailhere").html("<a  href='mailto:"+email+"?subject=code"+br+"&body=Click here to
get code "+encodeURIComponent(imagelink)+"'>Mail");
}

<div class="foot" id="code-foot">
   <div id="mailhere" class="span1">
   </div>  
</div>

你不能。如果您希望浏览器访问一个URI,那么您应该期望它在地址栏中显示该URI。