zoukankan      html  css  js  c++  java
  • createTextRange Sample

    <html>
    <head>

    <script language="Javascript" type="text/javascript">
    function sixteenth(src)
    {
        var oSrc = eval("document." + src);
        oSrc.focus();
        oSrc.select();

        textRange = oSrc.createTextRange();
        textRange.execCommand("Copy");
        window.status = "Text is copied to clipboard!";
        setTimeout("window.status=''", 1000);

    }
    </script>

    </head>

    <body>

    <form name="text">
    <a href="javascript:sixteenth('text.code')"> &nbsp;Copy All&nbsp; </a><br><br>
    <textarea name="code" rows=10 cols=35 >1st JavaScript Editor is used to create animations and other special effects for Web pages using DHTML and JavaScript.
    </textarea>
    </form>

    </body>
    </html>

  • 相关阅读:
    Linux搭建JAVAWEB环境
    java异常捕获
    java流2
    java流
    32
    java代码List
    java代码输入流篇2
    java流类练习前篇
    java流网址:
    java中i/o练习
  • 原文地址:https://www.cnblogs.com/helife/p/1920815.html
Copyright © 2011-2022 走看看