JavaScript
function pasteff(id,text){ if(Prototype.Browser.IE){ return; } var offset = $(id).positionedOffset(); var ret = Element.getDimensions($(id)); var tmp = document.createElement("div"); tmp.innerHTML = [ '<embed src="paste.swf" wmode="transparent" menu=false' ,' FlashVars="cmd=',encodeURI($(text).value),'"' ,' width="' + ret.width + '" height="' + ret.height + '"' ,'></embed>' ].join(""); with(tmp.style){ position ="absolute"; left = offset[0] + "px"; top = offset[1] + "px"; }; document.body.appendChild(tmp); setTimeout(function(){document.body.removeChild(tmp)},1000) return; } function pasteie(text){ window.clipboardData.setData('text', $(text).value); return; }HTML
<input type="text" id="copyme1" name="copyme1" value="コピー内容1" /> <input id="clip1" type="button" value="クリップボードに貼り付け1" onmouseover="paste(this.id,'copyme1')" onclick="pasteie('copyme1')"/><br /> <input type="text" id="copyme2" name="copyme2" value="コピー内容2" /> <input id="clip2" type="button" value="クリップボードに貼り付け2" onmouseover="paste(this.id,'copyme2')" onclick="pasteie('copyme2')"/>Flash
右クリックして保存