jquery 创建html并添加事件
创建一个html标签 并以一个对象添加属性,事件
eg:
$('img',{
src:'images/little.png',
alt:'set',
title:'i am title',
click:function(){
alert($this).attr('title');
}
}).css({
cursor:'pointer',
border:'1px solid black',
backgroundColor:'white'
}).appendTo('body');
浙公网安备 33010602011771号