简体   繁体   English

mailto:使用scala.html中的播放框架,链接不起作用

[英]mailto: link not working using play framework in scala.html

<a href="mailto:support@abc.com"> mail me </a>

Above code does not work because The @-symbol in mailto makes the framework cry for a value since it thinks that @ is a scala-command. 上面的代码不起作用,因为mailto中的@符号使框架为某个值而哭泣,因为它认为@是一个scala命令。 Thus, to escape the @-symbol I used double @@ which works in simple texts. 因此,为了逃避@符号,我使用了双@@,它在简单的文本中起作用。

But in above link when I used like this: 但是在上面的链接中,当我这样使用时:

<a href="mailto:support@@abc.com"> Mail me </a>

here, mailto: is not working. 在这里,mailto:不起作用。

You need put @ twice, like support@@abc.com 您需要两次输入@ ,例如support@@abc.com

I did verification on my own twirl template 我在自己的旋转模板上进行了验证

<a href="mailto:support@@abc.com"> Mail me </a>

Is perfectly work. 是完美的工作。 Maybe you cached a wrong version? 也许您缓存了错误的版本?

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

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