项目作者: by-syk

项目描述 :
jQuery Copy Plugin
高级语言: HTML
项目地址: git://github.com/by-syk/jquery-copy.git
创建时间: 2017-06-29T15:43:08Z
项目社区:https://github.com/by-syk/jquery-copy

开源协议:Apache License 2.0

下载


jquery.copy.js - jQuery Copy Plugin

Download

Usage

  1. <script src="jquery.js"></script>
  2. <script src="jquery.copy.js"></script>
  • Via jQuery

    for content:

    1. var res = $.copy("Hello, world!");
    2. var res = $.copy(999);
    3. var res = $.copy(true);
    4. var res = $.copy([1, 2, 3]);
    5. var res = $.copy({"status": 0, "data": []});

    for jQuery object:

    1. var res = $.copy($("#divContent"));
  • Or via function

    for content:

    1. <a href="javascript:void(0);" onclick="copyText('By_syk@163.com')">By_syk@163.com</a>

    for DOM node:

    1. <a href="javascript:void(0);" onclick="copyText(this)">By_syk@163.com</a>

Compatible

Almost all modern browsers are supported.

Sites using jquery.copy.js

http://nano.by-syk.com

License

  1. Copyright 2017 By_syk
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.

Copyright © 2017 By_syk. All rights reserved.