<head>
????<title>Title</title>
????<script?type="text/javascript"?src="js/jquery-1.8.3.min.js"></script>
????<script?type="text/javascript">
????$(document).ready(function?()?{
????????$("div").each(function?(index,ele)?{
????????????var?s?=?ele.html;
????????????alert(index?+?"?"?+?s);
????????});
????});
</script>
</head>
<body>
????<div>bnm</div>
????<div>a</div>
????<div>b</div>
????<div>c</div>
</body>
</html>為什么每個彈窗顯示s那里都是undefine呢?
jquery怎么獲取節(jié)點的值
fenkapian
2017-03-29 21:26:37