$("#button").click(function(){ $("#form-field-name").select() document.execCommand("copy"); } *!* ); */!*