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

JS實(shí)現(xiàn)獲取剪貼板內(nèi)容的方法

 更新時(shí)間:2016年06月21日 15:25:59   作者:yiluoAK_47  
這篇文章主要介紹了JS實(shí)現(xiàn)獲取剪貼板內(nèi)容的方法,涉及javascript基于clipboardData操作剪貼板的相關(guān)技巧,需要的朋友可以參考下

本文實(shí)例講述了JS實(shí)現(xiàn)獲取剪貼板內(nèi)容的方法。分享給大家供大家參考,具體如下:

這里介紹了JS獲取剪貼板內(nèi)容的代碼:

<Script Language="JavaScript">
var content = clipboardData.getData("Text");
if (content!=null) {
  document.write("<center><font size=5 color=red>WARNING, TEXT RETRIEVED:</font> (see below)<br><br><span style='background-color: #FFFF00'>");
  document.write(content);
  document.write("</span>");}
else {
  document.write('<center>No text found in clipboard. This is a good thing!<br><br>Works with Internet Explorer and Netscape.');
}
</Script>

var o=pos.parentElement().parentNode;
var txt=window.clipboardData.getData("Text");
$('#tempForClip').val(txt);
var temp=$('#tempForClip').val();
window.clipboardData.setData("Text",temp);

更多關(guān)于JavaScript相關(guān)內(nèi)容感興趣的讀者可查看本站專(zhuān)題:《JavaScript切換特效與技巧總結(jié)》、《JavaScript查找算法技巧總結(jié)》、《JavaScript動(dòng)畫(huà)特效與技巧匯總》、《JavaScript錯(cuò)誤與調(diào)試技巧總結(jié)》、《JavaScript數(shù)據(jù)結(jié)構(gòu)與算法技巧總結(jié)》、《JavaScript遍歷算法與技巧總結(jié)》及《JavaScript數(shù)學(xué)運(yùn)算用法總結(jié)

希望本文所述對(duì)大家JavaScript程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論