$("img").attr({ src: "test.jpg", alt: "TestImage" }); //添加样式 $("p").css({ color: "#ff0011",background: "blue" }); //修改样式