mailto失败在IE中有一个长的身体文本。有没有办法解决这个问题? [英] mailto fails in IE where there is a long body text. Is there any way to resolve this?

查看:94
本文介绍了mailto失败在IE中有一个长的身体文本。有没有办法解决这个问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Internet Explorer 8(IE8)打开具有长消息的mailto链接时出现问题。

I am having a problem using Internet Explorer 8 (IE8) to open mailto links with long messages.

用户点击链接后,IE会更改为about:空白页,从不完成对Outlook的呼叫以创建电子邮件

After the user clicks on the link, IE changes to an about:blank page and never completes the call to outlook to create an email

这里有一个例子:

<a href="mailto:name@name.com?subject=123456789&amp;body=111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111">mailto fails in IE8</a>

如果我缩短了1的列表,则会生成电子邮件并发送。

If I shorten the list of 1's, the email is generated and can be sent.

这是一个已知的IE问题吗?有什么限制?

Is this a known IE issue? What are the limitations?

推荐答案

我也遇到IE8的这个问题。令人惊讶的是,这正在发生;这似乎是我们在1998年左右遇到的问题!

I too ran into this problem with IE8. Amazing that this is happening; it seems like a problem we'd have run into circa 1998!

无论如何,我做了一些测试,并提出了使用Javascript的解决方法:

Anyway, I did some testing and came up with a workaround that uses Javascript:

<a href="javascript:doMailto()">Send Email</a>

然后定义此脚本:

<script type="text/javascript">
   var sMailto = "mailto:name@name.com?subject=123456789&amp;body=111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111234567890";

   function doMailto() {
      document.location.href = sMailto;
   }

</script>

由于任何原因,IE没有问题转发到长URL(我的测试场景使用800+字符)。在多个 mailto 链接的情况下,您可以定义多个URL变量,并将参数发送到 doMailto()切换到相应的一个。

For whatever reason, IE has no problem "forwarding" to long URLs (my testing scenario uses 800+ characters). In cases with multiple mailto links, you could define multiple URL variables and send a parameter into doMailto() that lets it switch to the appropriate one.

是丑吗?你打赌但它的工作在一个捏。

Is it ugly? You bet. But it works in a pinch.

这篇关于mailto失败在IE中有一个长的身体文本。有没有办法解决这个问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆