I want to select/highlight a Image by clicking a Button. my purpose is to copy a image.
$(document).ready(function () {
$("#btnCopy").click(function () {
document.execCommand('copy');
//Unselect the content
window.getSelection().removeAllRanges();
//Make the container Div uneditable again
$(this).removeAttr("contenteditable");
//Success!!
alert("image copied!");
});
});