M
Mahsha
<html>
<head>
<title></title>
<script type="text/javascript">
function fnCopy(objId) {
var imgObj = document.getElementById('imgId');
imgObj.contentEditable = 'true';
var controlRange;
if (document.body.createControlRange) {
controlRange = document.body.createControlRange();
controlRange.addElement(imgObj);
controlRange.execCommand('Copy');
alert("Copy image done");
}
imgObj.contentEditable = 'false';
}
</script>
</head>
<body>
<div id="test1">
<img id="imgId" src="http://www.google.com/intl/en_ALL/images/
logo.gif" />
</div>
<a href="javascript:fnCopy('test1');">Copy Image</a>
</body>
</html>
<head>
<title></title>
<script type="text/javascript">
function fnCopy(objId) {
var imgObj = document.getElementById('imgId');
imgObj.contentEditable = 'true';
var controlRange;
if (document.body.createControlRange) {
controlRange = document.body.createControlRange();
controlRange.addElement(imgObj);
controlRange.execCommand('Copy');
alert("Copy image done");
}
imgObj.contentEditable = 'false';
}
</script>
</head>
<body>
<div id="test1">
<img id="imgId" src="http://www.google.com/intl/en_ALL/images/
logo.gif" />
</div>
<a href="javascript:fnCopy('test1');">Copy Image</a>
</body>
</html>