欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JS+flash實(shí)現(xiàn)chrome和ie瀏覽器下同時(shí)可以復(fù)制粘貼

 更新時(shí)間:2013年09月22日 15:37:52   作者:  
chrome和ie同時(shí)可以復(fù)制粘貼,想必大家一直思索的問(wèn)題在本文將有一個(gè)不錯(cuò)的實(shí)現(xiàn),下面為大家介紹下JS+flash是如何實(shí)現(xiàn)的,感興趣的朋友可以參考下
利用2個(gè)文件

ZeroClipboard.js

ZeroClipboard.swf
復(fù)制代碼 代碼如下:

<script type="text/javascript" src="ZeroClipboard.js"></script>
<script language="JavaScript">

var clip = null;

function $(id) { return document.getElementById(id); }

function init(xm) {
clip = new ZeroClipboard.Client();
clip.setHandCursor( true );

clip.addEventListener('load', function (client) {
debugstr("Flash movie loaded and ready.");
});

clip.addEventListener('mouseOver', function (client) {
// update the text on mouse over
clip.setText($('txt_links').value );
});

clip.addEventListener('complete', function (client, text) {
debugstr(xm );
});

clip.glue( 'd_clip_button', 'd_clip_container' );
}

function debugstr(msg) {
if(msg=='1'){
alert('復(fù)制成功,請(qǐng)用Chrl+V粘貼');
//alert('chushihu,請(qǐng)用Chrl+V粘貼');
}else{

}

}
</script>

注意:<body onload="init(1);">

相關(guān)文章

最新評(píng)論