编辑下面的代码:【加编码】
<html> <head> <script> function showMsg() { alert("你选取了一些文本信息!"); } </script> </head> <body> Some text: <input type="text" value="选取我!!" onselect="showMsg()"> <p>showMsg() 函数在选取输入域文本信息时触发。 该函数弹出了一些信息。</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂