yourform.A_Hidden_Inputbox.value = document.execCommand("Paste")
yourvalue = yourform.A_Hidden_Inputbox.value

解决方案 »

  1.   

    getData MethodRetrieves the data in the specified format from the clipboard through the dataTransfer or clipboardData objects.
    ExamplesThe following examples use the setData and getData methods of the dataTransfer object to drop text in a new location and create a desktop shortcut.
    This example uses the getData method to drag text and drop it in a new location.<HEAD>
    <SCRIPT>
    function InitiateDrag(){
      event.dataTransfer.setData(oSource.innerText);
    }function FinishDrag(){
      window.event.returnValue=false;
      oTarget.innerText = event.dataTransfer.getData("Text");
    }
    function OverDrag(){
      window.event.returnValue=false;
    }
    </SCRIPT>
    </HEAD>
    <BODY><B ID="oSource"
       ondragstart="InitiateDrag()">
    drag this text</B><SPAN ID="oTarget"
       ondragover="OverDrag()"
       ondragenter="FinishDrag()"">
    drop text here</SPAN></BODY>