function url_copy(id){ var $temp = $(""); $(".vd_indent").append($temp); if(id=="#vd_input_link"){ $temp.val($(id).val()).select(); }else{ var str = $(id).html(); str = str.replace('<', '<'); str = str.replace('<', '<'); str = str.replace('>', '>'); str = str.replace('>', '>'); $temp.val(str).select(); } document.execCommand("copy"); $temp.remove(); $("#vd_temp_input").remove(); alert("소스가 복사되었습니다.\n블로그/카페/게시판 등에 붙혀쓰세요!"); }