JSP关于单选按钮和页面跳转的问题

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Jsp Practice</title>
</head>
<script type="text/javascript" language="javascript">
function jump(){
	var value=document.getElementById("aa").value;
	if(value=="a"){
		window.location.href="success.jsp";
		
	}else{
		window.locatiion.href="failure.jsp";
	}
}

</script>
<body>

<input type="radio" id="aa" name="as" value="a" />

<input type="submit" id="cc" value="提交" onclick="jump();">


</body>
</html>

你可能感兴趣的:(java,html,jsp)