日期:2014-05-16 浏览次数:20450 次
<html>
<head>
<script language=”javascript”>
function nocopy() {
alert(“对不起,你不能非法复制本站内容”);
event.returnvalue=false;
}
</script>
</head>
<body oncopy=”nocopy()”>copyright by commander. </body>
</html>
<table width="50%" border="1" align="center"> <tr onkeydown="copy();"> <td>111111</td> <td>222222</td> </tr> </table> <script language="javascript" type="text/javascript"> function copy(tdContent) { if (event.ctrlKey == true && (event.keyCode == 99 || event.keyCode == 67)) {window.alert("你按下了Ctrl + C");} } </script>