在JavaScript中提醒阵列,并使其复制/粘着

发布于 2025-01-25 12:04:20 字数 438 浏览 3 评论 0原文

在JavaScript上,我有一个多个变量:存档。首先,我希望该页面通过在表的每个值上跳过行来显示此表。其次,我希望警报被用户“共交”。我实现了看起来像这样的第一部分。 https://i.sstatic.net/7xtfh.png

然而: var Archive = Archive.join(“ \ n”)阻止警报的复制功能。

我的问题是:是否有一种方法可以跳过数组中的值之间的界限,使其可由用户交配。 (所有这些都在警报JavaScript函数中)。

提前致谢 ! (如果您需要存档数组的代码部分,请让我知道)

On JavaScript, I've got an array of multiple variables: archive. First, I would like the page to display this table by skipping rows at each value of the table. Second, I want the alert to be "copiable" by the user. I achieved the first part that looks like that.
https://i.sstatic.net/7Xtfh.png

However, it appears that the line :
var archive = archive.join("\n") blocks the copy feature of the alert.

My question is : is there a way to skip a line between values in an array AND makes it copiable by the user. (all of this in an alert javascript function).

Thanks in advance ! (if you need the code part of the archive array, let me know)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文