jQuery API | 返回首页目录 | jQuery API 中英文对照版 |
html(val) |
html(val)
设置每一个匹配元素的html内容。这个函数不能用于XML文档。 返回值:jQuery 参数:
$("div").html("<b>new stuff</b>"); HTML 代码: <div><input/></div> 结果: <div><b>new stuff</b></div> Set the html contents of every matched element. This property is not available on XML documents (although it will work for XHTML documents). Return value: jQuery
Example: $("div").html("<b>new stuff</b>");Before: <div><input/></div>Result: <div><b>new stuff</b></div> |