<script type="text/javascript"> if (top.location != self.location) { top.location = self.location; } function fullWin(url){ var newPage = window.open(url, '_blank', "scrollbars=no,status=yes,resizable=no,top=0,left=0,width=" + (screen.availWidth-10) + ", height=" + (screen.availHeight-30)); newPage.focus(); window.opener = null; window.open('','_self'); window.close(); } function mainLoginFun(url) { var uid = document.getElementById('username').value; var pwd = document.getElementById('password').value; url = url+"?uid="+uid+"&pwd="+pwd; Ext.Ajax.request({ url:url, success: function(resp,opts) { var respText = Ext.util.JSON.decode(resp.responseText); if(respText.success){ //location.href("<%=request.getContextPath()%>/showMain.action"); //window.open("<%=request.getContextPath()%>/showMain.action","图档管理系统", // "height="+window.screen.height+",width="+window.screen.width+",toolbar=no,menubar=no,location=no,status=no"); //window.close(); fullWin("<%=request.getContextPath()%>/showMain.action"); } }); }
有大神能帮小弟讲讲这段程序的意思么,小弟新手学得实在有点痛苦
第一个重设地址
第二个是打开一个小窗口,里面可能会呈现一个url正常打开时的内容
第三个是提交登陆,读取用户名和密码,通过ext ajax去访问服务器端,然后返回,如果正确,就正常登陆了
谢谢大神,另外大哥可不可以每行代码都注释一下