Search In This Blog

2022-09-07

DOMException: Failed to execute 'querySelectorAll' on 'Element': '#1' is not a valid selector.

<div id="1">HELLO</div>

When id is number likes: 1,

CSS.escape(1)

 

document.querySelector("#\\31");

 

No comments:

Post a Comment