Run ยป
<!DOCTYPE html> <html> <head> <title>Select Method</title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"> </script> <!-- JQuery code to show the working of this method --> <script> $(document).ready(function() { $("input").select(function() { alert("Something was selected"); }); $("textarea").select(function() { alert("Something was selected"); }); }); </script> <style> div { width: 250px; height: 40px; padding: 20px; } </style> </head> <body> <div> <!-- select any thing from inside this field --> <input type="text" value="Student Tutorial!"> <br><br> <textarea rows="4" cols="50">At Student Tutorial!you will learn how to make a website.