版友aaron 贡献了一个自定义demo登录界面例子,但我输入用户名和密码后没有反映,用帮助文档上的代码则可以,我想用他的的登陆界面,请帮忙修改一下。
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>华腾报表</title>
- <style type="text/css">
- <!--
- *{overflow:hidden; font-size:9pt;}
- body {
- margin-left: 0px;
- margin-top: 0px;
- margin-right: 0px;
- margin-bottom: 0px;
- background-image: url(images/bg.gif);
- background-repeat: repeat-x;
- }
- -->
- </style></head>
- <script type="text/javascript" src="ReportServer?op=emb&resource=finereport.js"></script>
- <script type="text/javascript">
- var username;
- var password;
- function doSubmit() {
- username = FR.cjkEncode(document.getElementById("username").value); //获取输入的用户名
- password = FR.cjkEncode(document.getElementById("password").value); //获取输入的参数
- $.ajax({
- url : FR.servletURL + '?op=fs_load&cmd=login',
- data : genUser(),
- type : 'POST',
- async : false,
- error : function() {
- alert("登录失败");
- },
- complete : function(res, status) {
- if (res.responseText == "") {
- alert("登录失败");
- return;
- }
- var signResult = FR.jsonDecode(res.responseText);
- if (signResult.fail) {
- alert("登录失败");
- } else if (signResult.url) {
- //alert(signResult.url);
- //window.location.href = "init.jsp";
- window.location.href=signResult.url;
- }
- }
- });
- }
- function genUser() {
- return FR.cjkEncodeDO({
- fsusername : username,
- fspassword : password,
- fsremember : false
- });
- }
- </script>
- <body>
- <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td height="561" style="background:url(images/lbg.gif)"><table width="940" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td height="238" style="background:url(images/login01.jpg)"> </td>
- </tr>
- <tr>
- <td height="190"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="208" height="190" style="background:url(images/login02.jpg)"> </td>
- <td width="518" style="background:url(images/login03.jpg)"><table width="320" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td width="40" height="50"><img src="images/user.gif" width="30" height="30"></td>
- <td width="38" height="50">用户</td>
- <td width="242" height="50"><input type="text" name="username" id="username" style="width:164px; height:32px; line-height:34px; background:url(images/inputbg.gif) repeat-x; border:solid 1px #d1d1d1; font-size:9pt; font-family:Verdana, Geneva, sans-serif;"></td>
- </tr>
- <tr>
- <td height="50"><img src="images/password.gif" width="28" height="32"></td>
- <td height="50">密码</td>
- <td height="50"><input type="password" name="password" id="password" style="width:164px; height:32px; line-height:34px; background:url(images/inputbg.gif) repeat-x; border:solid 1px #d1d1d1; font-size:9pt; "></td>
- </tr>
- <tr>
- <td height="40"> </td>
- <td height="40"> </td>
- <td height="60"><input type="button" onClick="doSubmit()" style="width:96px; height:36px;background:url(images/login.gif) repeat-x; border:solid 1px #d1d1d1;" /></td>
- </tr>
- </table></td>
- <td width="214" style="background:url(images/login04.jpg)" > </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td height="133" style="background:url(images/login05.jpg)"> </td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table>
- </body>
- </html>
复制代码
|