http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/getdata.asp
解决方案 »
- extjs4.0 MVC 取store的问题
- js删除cookie问题
- 简单问题
- 不知道有没有人做过这样的效果,紧急,请大家帮帮忙(先隐藏,后显示)
- 请问网站每行文字下面自动加一条虚线是怎么实现的
- ##########如何让div随window.resize改变大小############
- 一个表单<form1>中部分元件有disabled属性。最后一个按钮点击后,所有的disabled属性都去掉。怎么实现?
- window.open post
- 急!急:如何使用链接来调用运行本地应用程序(exe文件)?请高手指教,多谢!
- 如何将excel转为json(不使用ActiveX)
- 请问如何限制文本框里只输入数字格式的,如何作啊,给出具体语句,用js?还是其它的,谢谢大家,急!!!
- 判断textBox中的文本内容!
<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>