1
是否可以返回元素類型?我想在沒有class屬性的情況下將類的樣式添加到HTML5對象中。返回元素類型
<!DOCTYPE>
<html>
<head>
<title>My page</title>
</head>
<body>
<header>
Hello World
</header>
<section>
Another object
</section>
</body>
<!-- jQuery if need be -->
<script>
$("body>*").each(function(){
alert($(this).object());
// Would alert "header" and "section"
});
</section>
</html>
真棒謝謝! – 2012-07-27 14:29:55