function CopyImage(img) {
if (img.tagName != 'IMG')
return;
if (typeof img.contentEditable == 'undefined')
return;
if (!document.body.createControlRange)
return;
var ctrl = document.body.createControlRange();
img.contentEditable = true;
ctrl.addElement(img);
ctrl.execCommand('Copy');
img.contentEditable = false;
alert('复制图片完成');
}
function CopyToClipBoard(){
var clipBoardContent="abcdefg";
window.clipboardData.setData("Text",clipBoardContent);
alert('复制文字完成');
}