HighlightAll function () {
var target = document.getElementById ( "txtLecturerAndStuName");
target.select (); // select the text
document.execCommand ( "Copy"); // copy command to perform a browser
alert ( "Copied good, can be attached stick ");
}
<asp:TextBox class="txtcontent" ID="txtLecturerAndStuName" MaxLength="200" runat="server"></asp:TextBox>
<input type="button" value="复制" onclick="HighlightAll()" />