使用jQuery选择HTML注释
有没有人知道如何用jQuery选择HTML注释节点?
<html><head>
<title>Check Test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$("body *").each(function() {
alert($(this).wrap("<span />").parent().html());
});
});
</script></head><body>
<!-- Hello -->
<p>
<label for="thing">Thing Label</label>
<input id="thing" type="checkbox" />
</p>这不会发表评论。
隔江千里