function copy(){
var url=document.getElementById("ww");
url.select(); // 选择对象
try{
if(document.execCommand('copy', false, null)){
document.execCommand("Copy");
alert("已复制好,可贴粘。");
} else{
alert("复制失败,请手动复制");
}
} catch(err){
alert("复制失败,请手动复制");
}
}
var url=document.getElementById("ww");
url.select(); // 选择对象
try{
if(document.execCommand('copy', false, null)){
document.execCommand("Copy");
alert("已复制好,可贴粘。");
} else{
alert("复制失败,请手动复制");
}
} catch(err){
alert("复制失败,请手动复制");
}
}