0
我用這對將文本複製到剪貼板..無法得到複製文本到剪貼板
http://www.steamdev.com/zclip/
我已經試過這樣的,但我無法得到複製的文本到剪貼板..
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/jquery.zclip.js"></script>
<script>
$(document).ready(function(){
$('textarea#showthis').zclip({
path:'js/ZeroClipboard.swf',
copy:function(){return $('#showthis').val();}
});
});
function myfunc2()
{
var selectedobj=document.getElementById('showthis');
if(selectedobj.className=='hide')
{ //check if classname is hide
selectedobj.style.display = "block";
selectedobj.readOnly=true;
selectedobj.className ='show';
} else {
selectedobj.style.display = "none";
selectedobj.className ='hide';
}
}
</script>
</head>
<body>
<label onclick="myfunc2()">Click here</label>
<textarea id="showthis" style="display:none" class="hide" readonly>hi, how are you?</textarea>
</body>
</html>
請告訴我出了什麼問題! (我不知道JavaScript和jQuery的東西!)
你有類似flashblock啓用的東西?你有沒有安裝flash插件? – looper
另外,閱讀此:https://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html – looper
我可以知道它是否適合你..?我的意思是我的上面的代碼.. – Otero