到msdn中查clipboard,有现成的代码可以参考。
而且你好像问错地方了,这里是java版。
而且你好像问错地方了,这里是java版。
解决方案 »
- 【约瑟夫环的问题】
- JAVA 用链表实现多项式加法
- 一道面试题目,求解!
- 请教请教
- 一个ACCESS查询问题
- 布局对象调用方法不懂?
- 初级问题,请大家帮忙
- 关于Jbuilder7连接oracle9??
- 安装jbuilder4.0 后,它问我要序列号和key:的东西,可是找了很久也没有找到,请各位帮个忙吧?小弟在这里谢过了!
- Spring Boot Actuator, endpoints.health.sensitive=false设置无效
- 请问那里可以查到java类库的资料,中文的详细的最好能下载的谢谢
- 请问 这样装载String 类Class clString = Class.forName( "String" );有何用途?
剪贴板的使用:<HTML>
<HEAD>
<SCRIPT>
var bResult;
// Select the text to be cut. Trailing spaces in a text
// selection in cut events cause the Cut shortcut menu item to
// remain disabled.
function fnLoad() {
var r = document.body.createTextRange();
r.findText(oSource.innerText);
r.select();
}
// Enable the Cut shortcut menu item over the DIV. Cut is disabled by default.
// Once Cut is enabled, Internet Explorer automatically copies the data to the
// clipboard and removes the selected text from the document.
function fnBeforeCut() {
event.returnValue = false;
}
//Assign data in text format to the window.clipboardData object.
//Display the result (Boolean) from the setData method in the input box below.
function fnCut(){
event.returnValue = false;
bResult = window.clipboardData.setData("Text",oSource.innerText);
oSource.innerText = "";
tText.innerText += bResult;
}
// Enable the Paste shortcut menu item over the DIV. Paste is disabled by default.
function fnBeforePaste() {
event.returnValue = false;
}
// Cancel the returnValue in onpaste for the text input, which
// has a default behavior.
function fnPaste() {
event.returnValue = false;
oTarget.innerText = window.clipboardData.getData("Text");
}
</SCRIPT>
</HEAD><BODY onload="fnLoad()" TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="fixed" BGCOLOR="#FFFFFF"
LINK="#000000" VLINK="#808080" ALINK="#000000"><DIV CLASS="clsSource" ID="oSource" onbeforecut="fnBeforeCut()" oncut="fnCut()">
Select and cut this text
</DIV>
<DIV CLASS="clsTarget" ID="oTarget" onbeforepaste="fnBeforePaste()" onpaste="fnPaste()">
Paste the Text Here
</DIV><BR><SPAN CLASS="clsData">setData Result: </SPAN>
<INPUT CLASS="clsText" ID="tText" TYPE="text" READONLY VALUE="" SIZE="6" TABINDEX="-1"></BODY>
</HTML>