javascript - Empty return from JQuery .contents() -
i'm trying html using:
$(document).ready(function () { var html = $("html").contents(); });
when type "html"
in chrome console "[]"
think html variable not loaded.
doing same thing in other web site, when type "html"
in chrome console get
[<head>…</head> ,#text,<body class="page_color default_font ext-webkit ext-chrome" id="ext-gen3" style>…</body>]
so, why there difference? in both application have jquery.
you have define globally
var html; $(document).ready(function () { html = $("html").contents(); });
Comments
Post a Comment