<Script type = "text / JavaScript"> function copyUrl2 () { var Url2 = document.getElementById ( "ID" ); Url2.select (); // Select the object document.execCommand ( "the Copy"); // perform browsing command to copy alert ( "copied, and can be affixed sticky." ); } </ Script>