简体   繁体   English

html mailto链接中的游标位置

[英]Cursor position in html mailto link

When using the additional parameters in a mailto:// hyperlink, the cursor is placed at the start of the message. 在mailto://超链接中使用其他参数时,光标位于消息的开头。 Is it possible to set the starting position of the cursor to another location in the body text? 是否可以将光标的起始位置设置为正文中的另一个位置?

For example, consider the following HTML: 例如,请考虑以下HTML:

<a href="mailto://example@example.com?subject=Hello&body=Hello,%0D%0A%0D%0A%0This%20is%20an%20additional%20line%20of%20text...">Click Here To Email Me</a>

Clicking on the link will launch the end-user's default email client and (if the client supports it) will pre-populate the to field with example@example.com , the subject field with Hello and the body field with: 单击该链接将启动最终用户的默认电子邮件客户端,并且(如果客户端支持它)将使用example@example.com预填充to字段,使用Hello填充主题字段,使用以下正文字段填充主体字段:

Hello,

This is an additional line of text...

The default positioning of the cursor (ie in OS X Mail.app) is at the beginning of the body, before the word "Hello". 光标的默认定位(即在OS X Mail.app中)位于正文的开头,在单词“Hello”之前。

How can the cursor be positioned after the ellipses, so the end-user can finish the message? 如何将光标定位在省略号之后,以便最终用户可以完成消息? Is that even possible? 这甚至可能吗?

It is not possible. 这不可能。

When you click on any "mailto:" link, the browser will handle the request to any E-mail application, either a Desktop application like - Microsoft Outlook, Mozilla Thunderbird etc. or another browser tab like GMail. 当您单击任何“mailto:”链接时,浏览器将处理对任何电子邮件应用程序的请求,如Microsoft Outlook,Mozilla Thunderbird等桌面应用程序或GMail等其他浏览器选项卡。

In the "mailto:" link, we can set only the to, subject etc. But not any other information regarding the cursor position. 在“mailto:”链接中,我们只能设置to,subject等。但不能设置有关光标位置的任何其他信息。

This is not possible. 这是不可能的。 You don't have that level of control. 你没有那种控制水平。

In fact, you can't even set the body and subject line for many e-mail clients. 实际上,您甚至无法为许多电子邮件客户端设置正文和主题行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM