Javascript/execCommand

解説 コンテンツ操作
sample1
sample1code
function s1Func(){
  var s1Input = document.getElementById("s1Input");
  s1Input.select();
  document.execCommand("copy");
}