input输入框
<div id="top-title" style="position: relative">
<img class="img-responsive center-block" alt="" src="" style="float:left;z-index: 999;position: absolute">
<input type="text" value="" id="awardQqQun1" style="float:left;z-index: 99;position: absolute">
<input type="text" value="" id="awardQqQun2" style="float:left;z-index: 99;position: absolute">
</div>
按钮
<button id="qqQunCopyBtn1" type="button" style="margin-top:5px;">点击复制群号</button>
给button添加一个事件
$("#qqQunCopyBtn1").on('click',function(){
var e=document.getElementById("awardQqQun1");//对象是content
e.select(); //选择对象
document.execCommand("Copy"); //执行浏览器复制命令
alert("群号复制成功");
});
该方法只能复制input里面的内容
如对本文有疑问, 点击进行留言回复!!
MFC的静态库.lib、动态库.dll(包含引入库.lib)以及Unicode库示例
CTF 刷题记录(一) 白云新闻搜索(手动与自动化SQL注入)
javascript如何使用函数random来实现课堂随机点名方法详解
网友评论