具体运行下面这个:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title><script>function pickup()
{
FormatText('copy');
clipText=clipboardData.getData("Text");
alert(clipText)
}
function FormatText(command, option){
document.execCommand(command, true, option);
}
</script>
</head><body>
aaa <p><button name="B3" onclick="javascript:pickup()">高级按钮</button></p></body></html>
让文字 aaa 呈选中状态的时候点 按钮,发现不运行呢
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title><script>function pickup()
{
FormatText('copy');
clipText=clipboardData.getData("Text");
alert(clipText)
}
function FormatText(command, option){
document.execCommand(command, true, option);
}
</script>
</head><body>
aaa <p><button name="B3" onclick="javascript:pickup()">高级按钮</button></p></body></html>
让文字 aaa 呈选中状态的时候点 按钮,发现不运行呢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货