jquery笔记:$(html)

    xiaoxiao2021-03-26  24

    一:

    $(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

    转载请注明原文地址: https://ju.6miu.com/read-660136.html

    最新回复(0)