<div style="height:1px; width:1px; overflow:hidden; position:absolute;left:-2px;"> <input type="text" id="copybox" value="" /> </div>
js:
$("#copybox").val("要复制的内容"); var str = $("#copybox"); str.select(); document.execCommand("Copy");
时间: 2024-10-18 23:15:33