[ExtJS5 Study Notes] section 25th uses the window. open () function to redirect the ExtJS5 logon page. extjs5window. open
Address: http://blog.csdn.net/sushengmiyan/article/details/40427543
Mvvm method to achieve login blog: http://blog.csdn.net/sushengmiyan/article/details/38815923
Author: sushengmiyan
Certificate ------------------------------------------------------------------------------------------------------------------------------------
I wrote an article about the system logon instance in Extjs5MVVM mode. After writing this article, someone raised a question, that is, every time you click it, the login form will pop up, the login form interface is no longer available after login, and this article is generated due to that problem.
Method 1: Official Website --- login experience instance: http://docs.sencha.com/extjs/5.0/tutorials/login_app.html adds a login sign, according to login or not, display different interface
Method 2: Use window. open to redirect a webpage.
Step 1: Download The extjs5 http://download.csdn.net/detail/sushengmiyan/7701943
Step 2: Create index.html and app. js with the following content:
App. js
Ext.application({ name : 'EnterSellSaves', launch : function() { Ext.create('Ext.Panel', { renderTo : Ext.getBody(), width : 200, height : 150, bodyPadding : 5, title : 'Hello World', html : 'Hello <b>World</b>...' }); }});
Index.html
<! DOCTYPE html>
On the login page, add a function to the login button.
Onclick = "login ()"
Function implementation:
<script type="text/javascript"> function login(){ window.opener = null; window.open('','_self');window.close();window.open('index.html','11','location=0,resizable=no,fullscreen=true,titlebar=no,status=no,toolbar=no,menubar=no,left=0,top=0'); }</script>
In this way, the index and html
For logical judgment, you can change it to jsp and ASP.
In this method, you can use sencha cmd to generate the application framework, or manually introduce js files. It feels good.
Final result-Logon page
After login jump
After the page jumps, the URL is complete.
How to solve the problem of returning to the login interface after the EXTJS5 login and refreshing the page (the login program changed through the official example ticket-app of extjs5)