Code
Execute
<!DOCTYPE html> <html> <head> <title>html tutorial - html5 - html code - html form - In 30Sec by Microsoft Award MVP - | wikitechy HTML onselect Attribute</title> </head> <body> Enter the text: <input type="text" value="Wikitechy tutorials!!" onselect="onSelect()"> <script> function onSelect() { alert("You are selected the Wikitechy tutorials!"); } </script> </body> </html>
Result