利用2个文件 ZeroClipboard.js ZeroClipboard.swf 复制代码 代码如下: <br><br>var clip = null; <br><br>function $(id) { return document.getElementById(id); } <br><br>function init(xm) { <BR>clip = new ZeroClipboard.Client(); <BR>clip.setHandCursor( true ); <br><br>clip.addEventListener('load', function (client) { <BR>debugstr("Flash movie loaded and ready."); <BR>}); <br><br>clip.addEventListener('mouseOver', function (client) { <BR>// update the text on mouse over <BR>clip.setText($('txt_links').value ); <BR>}); <br><br>clip.addEventListener('complete', function (client, text) { <BR>debugstr(xm ); <BR>}); <br><br>clip.glue( 'd_clip_button', 'd_clip_container' ); <BR>} <br><br>function debugstr(msg) { <BR>if(msg=='1'){ <BR>alert('复制成功,请用Chrl+V粘贴'); <BR>//alert('chushihu,请用Chrl+V粘贴'); <BR>}else{ <br><br>} <br><br>} <BR> 注意: