选取文本域中的内容
- <html>
- <head>
- <script type="text/javascript">
- function selText()
- {
- document.getElementById("myText").select()
- }
- </script>
- </head>
- <body>
- <form>
- <input size="25" type="text" id="myText" value="选定我吧!">
- <input type="button" value="选择文本" onclick="selText()">
- </form>
- </body>
- </html>