<script type="text/javascript">
var type = 1;
var request = new XMLHttpRequest();
function landing(){
var userId = document.getElementById("inputId").value;
var userSecret = document.getElementById("inputPassword").value;
var url = "Landing.jsp?"+"userId="+userId+"&userSecret="+userSecret+"&type="+type;
request.open("get", url, true);
request.onreadystatechange = landingReturn;
request.send(null);
}
function landingReturn(){
window.alert(request.readyState);
window.alert(request.status);
window.alert(request.responseText);
if(request.readyState == 4 && request.status == 200){
var result = request.responseText;
window.alert(result);
if(result==1){
window.location.href = "chief.html";
}
else{
window.alert("登录失败");
}
}
}
var type = 1;
var request = new XMLHttpRequest();
function landing(){
var userId = document.getElementById("inputId").value;
var userSecret = document.getElementById("inputPassword").value;
var url = "Landing.jsp?"+"userId="+userId+"&userSecret="+userSecret+"&type="+type;
request.open("get", url, true);
request.onreadystatechange = landingReturn;
request.send(null);
}
function landingReturn(){
window.alert(request.readyState);
window.alert(request.status);
window.alert(request.responseText);
if(request.readyState == 4 && request.status == 200){
var result = request.responseText;
window.alert(result);
if(result==1){
window.location.href = "chief.html";
}
else{
window.alert("登录失败");
}
}
}