在asp.net程序开发中,如何实现复制文本框中的内容,并粘贴到word中。(如复制FCKeditor中的所有内容到word)
各位大虾帮帮忙啊!!

解决方案 »

  1.   

    onClick="this.select();js=this.createTextRange();js.execCommand('Copy');alert('复制成功');" 
    document.getElementById("txt").value
      

  2.   

    //将文本框中内容放到WINDOWS 剪切板内function copy()
            {
                window.clipboardData.setData("Text", document.getElementById("txt").value);
                alert("复制成功!");
            }
      

  3.   


    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
             <script type="text/javascript" language="javascript">
                function copyboard(guidtext,textid)
                {
                    window.clipboardData.setData('Text',guidtext);
                    tb= document.getElementById(textid);
                    tb.select();
                }
        </script>
        <div>
            <asp:TextBox ID="TextBox1" runat="server" Width="445px" />
            <input type="button" onclick= "copyboard(document.getElementById('TextBox1').value,'TextBox1')" value="复制到剪贴板" />
        </div>    </div>
        </form>
    </body>
    </html>
      

  4.   

    如果你是想 把文本框中的内容 直接导入 word。 那就没有必要复制了... 直接导入。
      

  5.   

    我用了FCKeditor控件  文本内容里不止有图片 还有表格 
    有没有别的方法,不用js写的。。