The following simple code samples will use PHP regular expressions strip away all characters from a string that are not letters or number. Learn the code.
You can find a lot of search engine results when you look for methods to block the highlighting of text in your HTML. Unfortunately, the top results for disabling text selection either aren’t fully supported (the CSS way) or could cause scripting errors. I’ll explain inside.
There’s a lot of syntax to remember when dealing with JS events, so I figured it would be a good idea to compile a reference list that covers all types of events and the proper syntax to use them. See the examples.