I wrote a special character in my HTML - ͩ to get a square root symbol. I am trying to get that button using innerText using javascript but it doesn't mean to work.
```else if (x.target.innerText == "√"){
console.log("H")
}
```
check out the code
Browsers normalise HTML when they convert it to a DOM.
so it is better to compare the text:
if ($(this).text() === "√"){
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.