html5 클립보드 복사

less than 1 minute read

$(“#test”).on(‘click’, function (e) {     var clip = new ClipboardEvent(‘copy’);     clip.clipboardData.setData(‘text/plain’, “test”);     clip.preventDefault();

    e.target.dispatchEvent(clip); });

http://caniuse.com/#feat=clipboard
http://www.htmlgoodies.com/html5/other/working-with-clipboard-apis-in-html5-web-apps.html#fbid=psQIhXZQXmo

-=- 테스트 안해봤음.

크롬에서 정상동작 안함. 포기


🔗original-link

Updated: