Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How to find radio button selection when a form is submitted?
How to find radio button selection when a form is submitted?
✍: Guest
<script type="text/javascript">
function findButton() {
var myForm = document.forms.animalForm;
var i;
for (i=0;i<myForm.marsupial.length; i++) {
if (myForm.marsupial[i].checked) {
break;
}
}
alert("You selected \""+myForm.marsupial[i].value+"\".");
}
</script>
<form name="animalForm" action="">
<input type="radio" name="marsupial" value="kangaroo" />Kangaroo
<br /><input type="radio" name="marsupial" value="Opossum" />Opossum
<br /><input type="radio" name="marsupial" value="Tasmanian Tiger" />Tasmanian Tiger
<input type="button" name="GO" value="GO" onclick="findButton()" />
2008-12-16, 4323👍, 0💬
Popular Posts:
What is the output of printf("%d")? 1. When we write printf("%d",x); this means compiler will print ...
What is Native Image Generator (Ngen.exe)? The Native Image Generator utility (Ngen.exe) allows you ...
Regarding C Coding Given: Line in file Contents 30 int * someIDs, theFirst, *r; 110 someIDs =GetSome...
How To Escape Special Characters in SQL statements? - MySQL FAQs - Introduction to SQL Basics There ...
How To Set session.gc_divisor Properly? - PHP Script Tips - Understanding and Using Sessions As you ...