Ctrl+/
IE11
F11
ESC
PgUp
PgDn
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>复制到剪切板</title>
</head>
<script>
function showDivLinkCopy() {
var msg=document.getElementById("text").value;
window.clipboardData.setData("Text",msg);
}
</script>
<body>
<input name="" type="text" id="text" value="测试测试" style=" border:1px solid #ccc; padding:4px; font-size:14px; color:#444; width:200px; line-height:20px;" />
<a href="javascript:void(0);" onclick="showDivLinkCopy()" style="padding-left:15px; line-height:30px; font-size:16px;">复制</a>
<h1 style="margin-top:300px; border-top:1px solid #ddd;"> by <a href="http://www.wweya.com">wweya.com</a></h1>
</body>
</html>
CSS代码...
JS代码...
xxxxxxxxxx