标签:点击 man log 按钮 lan ctr blog 粘贴 ack
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>点击按钮时将选中文字复制</title> </head> <body> <h2>我是H2标签</h2> <input type="button" onclick="copy()" value="点击后复制鼠标左键选中的文字"> <input type="text" placeholder="ctrl + v或右键粘贴"> <script> function copy(){ document.execCommand("Copy"); } </script> </body> </html>
标签:点击 man log 按钮 lan ctr blog 粘贴 ack
原文地址:http://www.cnblogs.com/webBlog-gqs/p/7173884.html