I wanted to write a HTML page with Javascript for a little game. I have many s and every sends a different variable to javascript when clicked. Now the problem with this is, that I wanted to exclude some s for a function, that should apply for every , except the ones excluded.
I wrote it like this:
if (pressedKey != "Leertaste" || "Enter" || "StrgR" || "Alt" || "AltGr" || "Tab" || "ShiftL" || "StrgL" || "ShiftR"){
document.getElementById(pressedKey).innerHTML = "<img src=\"push1.png\">"
}
But it's not working.. It still triggers the function, although the pressedKey is one of the excluded ones..
I hope someone can help.
3m7ecc