<html>
<head>
<title>Quiz Application</title>
<script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script type="text/javascript" charset="utf-8">
function ready() {
if (document.getElementById("rb1").checked) {
alert("correct");
} else if (document.getElementById("rb2").checked) {
alert("incorrect");
} else {
alert("incorrect");
}
function prevpage() {
document.location=document.history.back();
}
}
</script>
</head>
<body id="body2">
<form method="post">
<center><h1>Quiz Application</h1></center><br><br>
<center>Is JAVA Object Oriented Language ?<br><br>
<radiogroup>
<input type="radio" id="rb1"/>Yes<br>
<input type="radio" id="rb2"/>No<br>
<input type="radio" id="rb3"/>May Be<br>
<input type="submit" id="sub" value="Freeze" onclick="ready();"/><br>
<input type="submit" id="next" value="Previous Question" onclick="prevpage();"/></center>
</radiogroup>
</form>
</body>
</html>
Above is my code for redirecting to first page which is not working .
Please help me for redirecting on first page.
I went through many options like window.location=-window.history.back(); ,window.history.back(1/-1) but none of them working.
Thanks in advance :)