移动端复制信息
<input type="text" value="要复制的文字" readonly="" id="form_tone">
code~
// 找到元素
var copycode = document.getElementById("form_tone");
// 选择对象
copycode.select(); // 选择对象
// 执行浏览器复制命令
document.execCommand("Copy");
// alert("复制成功!")
移动端复制信息
<input type="text" value="要复制的文字" readonly="" id="form_tone">
code~
// 找到元素
var copycode = document.getElementById("form_tone");
// 选择对象
copycode.select(); // 选择对象
// 执行浏览器复制命令
document.execCommand("Copy");
// alert("复制成功!")