• 刚看到的jq插件开发的小练习


    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.min.js"></script>
    <script type="text/javascript">
    (function ($){
    $.fn.tableadd=function(options){
    var defaults={TriggerMode:"hover"};
    var opts=$.extend({}, defaults, options);
    var obj=$(this);
    obj.append("<tr><th>高度</th></tr>");
    /* obj.bind(opts.TriggerMode,function(){
    obj.append("<tr><th>高度</th></tr>");
    obj.css("background-color","red");
    });*/
    };
    })(jQuery);
    $(document).ready(function () {
    $("#tb").tableadd({TriggerMode:"click"});
    })
    </script>
    </head>

    <body>
    <table id="tb" style="border:1px solid red;50px;height:50px; background-color:red"></table>
    </body>
    </html>

    参考网站http://www.linuxeden.com/html/news/20130626/140746.html

    http://www.poluoluo.com/jzxy/201204/163035.html

    http://developer.51cto.com/art/201108/286391.htm

    http://www.iteye.com/topic/545971

    http://www.jb51.net/article/22849.htm

  • 相关阅读:
    dijkstra 为什么不能解决负权边?
    Asteroids poj3041
    Dining poj3281
    炮兵阵地
    玉米田Corn Fields
    互不侵犯
    Golang---内存管理(内存分配)
    单例模式-Singleton
    HTTP2.0 学习
    Golang---GMP调度策略
  • 原文地址:https://www.cnblogs.com/liziqiang/p/3770232.html
Copyright © 2020-2023  润新知