SyntaxFix
Write A Post
Hire A Developer
Questions
Use:
function getvalues(){ var inps = document.getElementsByName('pname[]'); for (var i = 0; i <inps.length; i++) { var inp=inps[i]; alert("pname["+i+"].value="+inp.value); } }
Here is Demo.
Demo