用数据来创建表格
var data = [
{ name: 'jim', age: 19, gender: 'male'},
{ name: 'jim', age: 19, gender: 'male'},
{ name: 'jim', age: 19, gender: 'male'},
{ name: 'jim', age: 19, gender: 'male'},
{ name: 'jim', age: 19, gender: 'male'},
{ name: 'jim', age: 19, gender: 'male'}
];
// 创建 table
$( '
' + v1 + ' | '
$( 'td' ).css( {
width: '100px',
height: '50px'
});
$( 'tr' ).mouseover(function () {
// this 是 DOM 对象
$(this).css( 'backgroundColor', 'yellow' );
}).mouseout(function () {
$(this).css( 'backgroundColor', '' );
});