//jquery 设置单个属性
$("img").attr("title","图片");
//jquery 设置多个属性
$("img").attr({
alt : "名字",
title : "标题",
custom : "自定义属性"
});
//jquery 获取属性
$("img").attr("title");
网友评论