web的代码是在WEB服务器上执行的,所以,你读的是服务器上的剪贴板的值

解决方案 »

  1.   

    js里用window.clipboardData.getData("text");可以取文本,但我想取html啊
      

  2.   

    window.clipboardData.getData( "html");又报错
      

  3.   

    首先,肯定是用JS来获取其次,取出来的文本,你是不是可以转换成HTML?
      

  4.   

    其次,取出来的文本,你是不是可以转换成HTML?=============================================我就是这个不知道怎么做
      

  5.   

    getData Method--------------------------------------------------------------------------------Retrieves the data in the specified format from the clipboard through the dataTransfer or clipboardData objects.SyntaxsRetrieveData = object.getData(sDataFormat)
    ParameterssDataFormat Required. String that specifies one of the following data format values: 
    Text Retrieves data formatted as text. 
    URL Retrieves data formatted as a URL. 
     Return ValueString. Returns the data in the format retrieved from clipboard through the dataTransfer or clipboardData object. Depending on the information contained in setData, this variable can retrieve a path to an image, text, or an anchor URL.ResThe getData method enforces cross-frame security and allows data transfers within the same domain only. To the user this means that dragging a selection between different security protocols, such as HTTP and HTTPS, will fail. In addition, dragging a selection between two instances of the browser with different security levels, where the first instance is set to medium and the second is set to high, will fail. Finally, dragging a selection into the browser from another drag-enabled application, such as Microsoft Word, also will fail. To use the getData method to retrieve data from the clipboard within the oncopy or oncut event, specify window.event.returnValue=false within the event handler script.Examples
      

  6.   

    用js获取添加到网页中.你可以搜索"javascript Dom"