Here's the HTML code:
<html>
<body>
<div id="wrapper">
<div id="c_wrapper">
<div class="member">
<form name="f1">
</form>
</div>
</div>
</div>
</body>
</html>
My JavaScript
var c_wrapper = document.getElementById("c_wrapper");
var mem = c_wrapper.getElementsByClassName("member");
var f = mem.lastChild;
When I log out variable 'f.tagName' to the console,I get the result of undefined value. What's wrong with this?
Do I need to get the outer-most element first?