login.html
function request(id,url){
oScript = document.getElementById(id);
var head = document.getElementsByTagName("head").item(0);
if (oScript) {
head.removeChild(oScript);
}
oScript = document.createElement("script");
oScript.setAttribute("src", url);
oScript.setAttribute( "id",id);
oScript.setAttribute("type","text/javascript");
oScript.setAttribute("言語","javascript");
head.appendChild(oScript) ;
return oScript;
}
function userLogin(){
var username=document.getElementById('name').value;
varpassword=document.getElementById('password').value;
// alert(ユーザー名 "--" パスワード);
var url='http://127.0.0.1:8080/EasyCMS/login.jsp?name=' encodeURI(ユーザー名) '&password=' encodeURI(パスワード) '&s=' (new Date()).getTime();
//alert("url=" url);
varlogin=request("loginScript",url);
}
関数 myloginState(state){
alert("ret:" state);
if (state==0)
{
alert("登陆成功");
}
else
{
alert("登陆失败");
}
}