问一个 JS 面试题

来源:百度知道 编辑:UC知道 时间:2024/05/29 19:33:22
下面是我写的代码 可是有错 代码要实现的需求是 点提交后显示你选中的是第几个单选框

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>-
<script type="text/javascript" src="jQuery1.3.js"></script>
</head>
<body>
<form action="#" onsubmit="return foo()">
<input type="radio" name="1">1<br>
<input type="radio" name="1">2<br>
<input type="radio" name="1">3<br>
<input type="radio" name="1">4<br>
<input type="

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>Untitled Document</title>
</head>
<body>
<form action="#" onsubmit="return foo()">
<input type="radio" name="1">1<br>
<input type="radio" name="1">2<br>
<input type="radio" name="1">3<br>
<input type="radio" name="1">4<br>
<input type="radio" name="1">5<br>
<input type="submit">
</form>
</body>
<script type=&q