本文介绍了Javascript mailto函数加载问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用JavaScript mailto
功能,当点击该按钮时,邮件会加载到同一个标签中。如何在新标签中加载邮件?
I'm using JavaScript mailto
function and when clicking on the button the mail loads in the same tab. How can I load the mail in a new tab?
这是我的代码:
<input type="button" value="Apply" name="apply" onclick="mailJob('Sample');">
function mailJob(code)
{
window.location="mailto:[email protected]?subject="+code;
}
推荐答案
使用 window.open
function。
Use window.open
function.
window.open('mailto:[email protected]?subject='+code, '_blank')
阅读更多。
这篇关于Javascript mailto函数加载问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!