<!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;width: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