您的位置:首页 > Web前端 > JQuery

jquery笔记:$(html)

2017-02-05 10:19 274 查看
一:

$(html,[ownerDocument])

示例:

$("<div><p>Hello</p></div>").appendTo("body");


二:$(html,props)

示例:

$("<input>", {
type: "text",
val: "Test",
focusin: function() {
$(this).addClass("active");
},
focusout: function() {
$(this).removeClass("active");
}
}).appendTo("form");

http://jquery.cuishifeng.cn/jQuery_html_ownerDocument.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  jquery