/ Published in: JavaScript
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
function showVals() {
theForm = document.getElementById('myform');
theStr = '';
for (i=0; i < theForm.elements.length; i++) {
ele = theForm.elements[i];
theStr += ele.name + ' : ' + ele.value + "\n";
}
alert (theStr);
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                