81,091
社区成员
发帖
与我相关
我的任务
分享
当前页面from如下:
<form action="doinputknowledgebaseinfo.jsp" method="post" name="passForm" id="passForm">
</from>
//post控制如下:
function doinputknowledgebaseinfo()
{
if(checkOtWorkInfo()) //通过内容完整性及规范性验证
{
with(document.getElementById("passForm"))
{
submit();
}
}
}
当前页面获取操作结果:
function init()
{
var flag = "<%=addFlag%>";
if (flag == "true")
{alert("操作成功!");}
else if (flag == "false")
{alert("操作失败!"); }
}
post到的页面中的操作成功代码返回如下:
if (ret) {
response.sendRedirect("createknowledgeBaseinfo.jsp?addFlag=true");
} else {
response.sendRedirect("createknowledgeBaseinfo.jsp?addFlag=false");
}
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" href="<%=path%>/claimManage/CSS/default.css" type="text/css">
<link rel="stylesheet" type="text/css" href="<%=path%>/css/default.css"></link>
<script language="javascript">
var ret = '<%=ret%>';
function init()
{
if ( ret == 'true' )
{
alert("操作成功!");
}
else
{
alert("操作失败!");
}
}
function btn_ok()
{
window.close();
}
</script>
<body onload="init()" class="insideFrame_body">
<table width="100%" class="DG_borderStyle_model">
<tr height="20px"><td></td></tr>
<tr width="100%" align="center" style="background-image:url(Images/pttop_RT.gif);">
<td height="20px" id="message"></td>
</tr>
<tr height="20px"><td></td></tr>
<tr width="100%" align="center">
<td>
<input type="button" value="确定" onclick="btn_ok()">
</td>
</tr>
</table>
</body>
</html>