我试图设置的网站似乎没有加载 js。 我安装了json 和 php- pearar, 并重新启动了 apache 和 Whatnot 。 当我去到页面时, 我所看到的只是背景和横幅 。
<html>
<head>
<link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" />
<script type="text/javascript" src="../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-all.js"></script>
<style type="text/css">
body
{
font-family: Arial, Verdana, sans-serif;
background-image: url(graphics/background_gradient.png);
background-repeat: repeat-x;
background-color: #374d5b;
margin: 0;
padding: 0 0 20px 0;
font-size: 13px;
color: #333;
text-align: center;
}
.root
{
width: 410px;
margin: 0 auto;
text-align: left;
background-color: #e6e6e6;
position: relative;
}
#header
{
background: #0e1d2f url(graphics/banner.png) no-repeat left;
height: 90px;
}
</style>
</head>
<body>
<div class="root">
<div id="header"></div>
</div>
<script type="text/javascript" src="login.js"></script>
</body>
</html>
我正在运行5号半人马5号
登录日志 :
Ext.onReady(function(){
Ext.QuickTips.init();
var login = new Ext.FormPanel({
labelWidth:80,
url: login.php ,
frame:true,
title: Please Login ,
defaultType: textfield ,
monitorValid:true,
items:[{
fieldLabel: Username ,
name: loginUsername ,
allowBlank:false
},{
fieldLabel: Password ,
name: loginPassword ,
inputType: password ,
allowBlank:false
}],
buttons:[{
text: Login ,
formBind: true,
handler:function(){
login.getForm().submit({
method: POST ,
waitTitle: Connecting ,
waitMsg: Sending data... ,
success:function(){
Ext.Msg.alert( Status , Login Successful! , function(btn, text){
if (btn == ok ){
var redirect = ./panel.php ;
window.location = redirect;
}
});
},
failure:function(form, action){
if(action.failureType == server ){
obj = Ext.util.JSON.decode(action.response.responseText);
Ext.Msg.alert( Login Failed! , obj.errors.reason);
}else{
Ext.Msg.alert( Warning! , Authentication server is unreachable : + action.response.responseText);
}
login.getForm().reset();
}
});
}
}]
});
var win = new Ext.Window({
layout: fit ,
width:300,
height:150,
closable: false,
resizable: false,
plain: true,
border: false,
items: [login]
});
win.show();
});