我想允许用户将大量电子邮件地址复制到他们的剪贴板。这个答案似乎是最可靠的方法:
但是,在测试时,我发现它window.prompt()
总是将其中一封电子邮件的一部分替换为...
.
这是测试数据:
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com; test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;
这是具有以下测试数据的示例代码:
window.prompt ("To copy emails to clipboard, press: Ctrl+C, then Enter",
"test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com; test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;test@test.com;test@test.com;test@test.com;
test@test.com;test@test.com;");
JSFiddle:http: //jsfiddle.net/MkYDz/
单击上面的链接,将文本复制并粘贴到文本编辑器中,您会看到其中一封电子邮件(大约一半)变为:
test@...om
为什么会这样?