robert_gsfame Posted December 27, 2010 Share Posted December 27, 2010 i have a form <form name=frm1> <input type="checkbox" value="a" name="xxxx"> </form> i wish to get the name of the elements using document.frm1.elements to get the value, i simply use document.frm1.elements[1].value; when i try to use document.frm1.elements[1].name to get the name of the element, i cant get it Link to comment https://forums.phpfreaks.com/topic/222734-get-form-elements-name/ Share on other sites More sharing options...
brianlange Posted December 27, 2010 Share Posted December 27, 2010 Your index is off. Use 0 instead of 1. document.frm1.elements[0].name Link to comment https://forums.phpfreaks.com/topic/222734-get-form-elements-name/#findComment-1151847 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.