I write the path of a document into the alert box via using below code.
var oArg = new Object();
oArg.Document = $(t).attr("path") + str + "/" + $(t).attr("name");
alert(oArg.Document);
Assume that message is : "documents/files/img/stack.jpg
"
I only want to copy this text with a button. For Chrome Ctrl + C is ok for it but for IE, Ctrl + C copies everything at the alertbox.
How can I copy only the message with using a button?
Ctrl + C works like below:
- Chrome - Works perfectly.
- Internet Explorer - Works, but you get extra text. The caption and OK button text is also copied, along with a bunch of dashes. This is almost never what you want.
- Firefox - Doesn't work at all You must select the text before you can copy it.