六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 133|回复: 0

Extjs复习笔记(九)-

[复制链接]

升级  20%

76

主题

76

主题

76

主题

举人

Rank: 3Rank: 3

积分
260
 楼主| 发表于 2013-2-7 22:44:19 | 显示全部楼层 |阅读模式
登陆时的加载状态:


<style type="text/css" media="all">#loading {position: absolute;left: 40%;top: 40%;padding: 2px;z-index: 20001;height: auto;color: #225588;}#loading .loading-indicator {background: greenyellow;color: #444;font: bold 13px tahoma, arial, helvetica;padding: 10px;margin: 0;height: auto;}#loading-msg {font: normal 10px arial, tahoma, sans-serif;}    </style><body>   <div id="loading"><div class="loading-indicator"><img src="../images/extanim33.gif" width="32" height="32"style="margin-right: 8px; float: left; vertical-align: top;" />    蓝杰-图书管理系统<br /><span id="loading-msg"><font color="red">提示:</font>加载中,请耐心等待...</span></div></div><script type="text/javascript">document.getElementById('loading-msg').innerHTML = '<font color="red">提示:</font>加载中,请耐心等待...';</script>………………(页面其它内容)<script type="text/javascript">   Ext.get('loading').remove();   function showAbout(){   Ext.Msg.alert("关于","<div><img src='../images/about.jpg'/></div><div style='float:left;width:400px;'><hr/><h2>开发者:凌艺宾<br/>学校:中南大学<br/>培训:蓝杰公司<h2></div>");   }    </script></body></html> 
 或者做得简单一点:
直接在button里面加上如下语句就行了
 
        handler : function() {            if (loginPanel.form.isValid()) {                    loginPanel.form.submit( {                        url : 'login.do',                        success : function(from, action) {                          Ext.get('loginpanel').remove();                          window.location.href='pages_share/main.html';                        },                        failure : function(form, action) {                           Ext.MessageBox.show({                    title:"登录失败",                    msg:"登录失败!请认真检查您的姓名密码及身份。",                    icon:Ext.MessageBox.ERROR,                    buttons:{"ok":"确定"}                    });                        },                        waitMsg : '正在登录,请耐心等候...'                    });
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表