点击gmail中的链接不会触发我的jquery事件,我该怎么办来解决它? [英] Clicking a link in gmail doesn't trigger my jquery event, What can I do to fix it?

查看:119
本文介绍了点击gmail中的链接不会触发我的jquery事件,我该怎么办来解决它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您点击gmail中的链接时,点击事件不会触发。点击其他网站上的链接,并点击gmail作品中的简单文本。但是,当您点击gmail中的链接时,不能。

The 'click' event in not trigger when you click on a link in gmail. Click on links in other sites work and clicking on simple text in gmail works. But not when you click on a link in gmail.

$('body').on('click', function(event) {
    console.log("Entered function");
});

还尝试了以下,但没有运气。

Also tried the following, but no luck.

$('a').click(function(){
    console.log("Entered function");
});


推荐答案

在大多数电子邮件客户端中,它不工作正如约翰指出的那样,这个帖子的答案指出了为什么通常被禁用;

In most email clients i've tried javascript in, it doesn't work. As john pointed out, the answers to this post points out why it is usually disabled;


恐怕这样的功能在理论上可能不会很实用,因为大多数电子邮件客户端都会删除或禁用JavaScript以防止恶意代码执行或其他安全问题

I'm afraid such functionality, while theoretically possible, wouldn't be very practical given that most email clients strip out or disable JavaScript in order to prevent malicious code execution or other security issues

如果您了解您的受众群体,我可以使用它>非常,因为,作为这个帖子(写在2010年,所以不要让你的希望太多)

I guess you could use it if you know your audience very well, since, as the first answer to this post (written in 2010 so don't get your hopes up too much)


Lotus Notes,Mozilla Thunderbird,Outlook Express和Windows Live Mail似乎都支持某种JavaScript执行。没有其他的东西。

Lotus Notes, Mozilla Thunderbird, Outlook Express, and Windows Live Mail all seem to support some sort of JavaScript execution. Nothing else does.

最后的手段可能是写一个病毒,进入电脑只需打开电子邮件,然后交替电子邮件客户端的源代码启用JavaScript功能。不过,我不会建议。

A last resort might be writing a virus that gets into the computer just by opening the email, and then alternating the source code of the email client to enable javascript functionality. I wouldn't recommend that, though.

使用链接的照片。

这篇关于点击gmail中的链接不会触发我的jquery事件,我该怎么办来解决它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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