1. 简单方法 HTML <!-- The text field --> <input type="text" value="Hello World" id="myInput"> <!-- The button used to copy the text --> <button onclick="myFunction()">Copy text</button> JavaScript function myFunction() { /* Get the text field */ var copyText = document.getElementById("myInput"); /* Select th… Read More