我想用JS修改所有类。有没有办法在不手动设置数组索引的情况下选择它们(例如 [0] 或 [1] 或 [184])?
示例代码:
<div class='message'>something:</div>
<div class='message'>something</div>
Run Code Online (Sandbox Code Playgroud)
const element = document.querySelectorAll(".message");
element.classList.add("color");
Run Code Online (Sandbox Code Playgroud)
它仅在我添加[0]并且仅适用于具有该类的第一个元素时才有效。但我想用类修改所有元素。
When somone send link in Skype or Discord, it can create image and description, like is shown on screenshots:


I think its because of <meta> tags in HTML <head>.
But in HTML can be hunderts of <meta> tags.. I found this page on GitHub, Link: https://gist.github.com/lancejpollard/1978404
And that's so many tags. Is there someone who know only tags, which is making these images and descriptions on Skype and Discord?
I tried adding some meta tags, favicon, and title, but …
如何以最佳性能在 Linux 窗口内手动绘制像素?
我不想直接写入帧缓冲区,但我也不想使用 OpenGL 或类似的库/API 为您做所有事情。是否可以创建彩色像素的二维数组,然后将它们打印在窗口内?
像这样(但有更多颜色):
_________________
| My App -ox|
_________________|
|RRRRGGBBRRRGGBBB|
|RRGGRGRGGRGRGGRR|
|RRGGGGBBBBRRGGBB|
|________________|
Run Code Online (Sandbox Code Playgroud)