執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <body> Some text: <input type="text" value="Select me!!" onselect="myFunction()"> <p>The function myFunction() is triggered when some text is selected in the input field. The function shows a message.</p> <script> function myFunction() { alert("You have selected some text!"); } </script> </body> </html>