<form name="FNAME">
<div id="div1">
<ul id="ul1"><li id="li1"><a href="" onclick="getValue(this);">Click</a> </li></ul>
</div>
</form>
<script type="text/javascript">
function getValue(elem) {
formName = $(elem.form.name).val();
alert(formName);
}
</script>
I am trying to get the form name of the above code:
formName is undefined using above code
How could i get the value of form name inside the javascript function?