我有index.html中下面的代码。 当执行该页面,一个页面显示登录与注销按钮,当登录另一个页面DIV用户点击= AuthBody被显示出来,现在当用户提供登录按钮凭证和点击,它连接到数据库,将数据写入到表div元素,但结果都不会显示在相同的外观和感觉就像前两页
我如何才能确保表结果显示在相同的区域/外观和感觉的前两页?
<head>
<meta charset="UTF-8">
<title>index</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<link rel="shortcut icon" href="images/favicon.png">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="stylesheet" href="css/main.css">
<script>window.$ = window.jQuery = WLJQ;</script>
</head>
<body style="display: none;">
<div id="AppBody">
<div class="header">
<h1>Custom Login Module</h1>
</div>
<div class="wrapper1">
<input type="button" value="Login" onclick="getSecretData()" />
<input type="button" value="Logout" onclick="WL.Client.logout('CustomAuthenticatorRealm',{onSuccess: WL.Client.reloadApp})" />
</div>
</div>
<div id="AuthBody" style="display: none">
<div id="loginForm">
Username:<br/>
<input type="text" id="usernameInputField" /><br />
Password:<br/>
<input type="password" id="passwordInputField" /><br/>
<input type="button" id="loginButton" value="Login" />
<input type="button" id="cancelButton" value="Cancel" />
</div>
</div>
<div id="ResTable" style="display: none">
<div class="header">
My Dispute List
</div>
<div class="wrapper">
<table data-role="table" data-mode="columntoggle" class="ui-responsive ui-shadow" id="mytable">
<thead>
<tr id="loadChat">
<th data-priority="1">Dispute Number</th>
<th data-priority="2">Status</th>
<th data-priority="3">Start Date</th>
<th data-priority="4">Customer Name</th>
<th data-priority="5">DRO</th>
<th data-priority="6">Dispute Manager</th>
</tr>
</thead>
</table>
</div>
</div>
将数据写入到表中的Java脚本代码
var mytabledata = "<table><tr><th> DISPUTE NUMBER </th>" + "<th>DISPUTE STATUS </th>" + "<th>START DATE </th>" + "<th>CUSTOMER NAME </th>" + "<th> DRO </th>" + "<th>DISPUTE MANAGER </th>";
if (result.invocationResult.resultSet.length > 0) {
for (var j = 0; j < result.invocationResult.resultSet.length; j++) {
var row = $("<tr />");
row.append($("<td>" + result.invocationResult.resultSet[j].DISP_NUMBER + "</td>"));
row.append($("<td>" + result.invocationResult.resultSet[j].DISP_STATUS + "</td>"));
row.append($("<td>" + result.invocationResult.resultSet[j].DISP_CREATE_DATE + "</td>"));
row.append($("<td>" + result.invocationResult.resultSet[j].CUST_CONT_NAME + "</td>"));
row.append($("<td>" + result.invocationResult.resultSet[j].DISP_RES_OWNER + "</td>"));
row.append($("<td>" + result.invocationResult.resultSet[j].DISP_MANAGER + "</td>"));
$("#loadChat").append(row);
$('#AppBody').hide();
$('#AuthBody').hide();
$('#ResTable').show();
}