this.mobj=document.getElementById(menu1)
var ob1 = this.mobj;
alert(" Obj value"+ob1.whichmethod());
In the alert I am getting "Drop menu Obj"+Object object
This is JavaScript.. If it was jQuery I could have done $(this).attr('value'). How to get the
value of JavaScript object?
I’m not sure if you’re looking for more, but if you want the value property of the object in JavaScript, you can do it like this:
If you’re looking for the href of the hyperlink, you can get it like this: