Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用JavaScript在电子邮件中显示电子邮件标题_Javascript_Email_Networking_Network Programming_Email Headers - Fatal编程技术网

使用JavaScript在电子邮件中显示电子邮件标题

使用JavaScript在电子邮件中显示电子邮件标题,javascript,email,networking,network-programming,email-headers,Javascript,Email,Networking,Network Programming,Email Headers,如何使用JavaScript在电子邮件本身中显示电子邮件的标题 例如:我知道在网页上,我可以使用以下JavaScript返回HTTP头: var req = new XMLHttpRequest(); req.open('GET', document.location, false); req.send(null); var headers = req.getAllResponseHeaders().toLowerCase(); alert(headers); 作为我这样的noob,我很快就认

如何使用JavaScript在电子邮件本身中显示电子邮件的标题

例如:我知道在网页上,我可以使用以下JavaScript返回HTTP头:

var req = new XMLHttpRequest();
req.open('GET', document.location, false);
req.send(null);
var headers = req.getAllResponseHeaders().toLowerCase();
alert(headers);

作为我这样的noob,我很快就认识到在电子邮件中使用JavaScript是不实际的/通常是不可能的。

如果不给你当前页面的标题,它会给你不同请求的标题。您请求相同的页面,但这并不意味着请求是相同的。