点击下面“确定”按钮, 后并没有转到update_priv.jsp 不知道是为什么, 那JAVASCRIPT代码也看不懂, 哪位高手能解释一下?
<link rel="stylesheet" type="text/css" href="../../../theme/1/style.css">
<script language="javascript">
function highlight(obj){
var hightlightBgColor = '#d6d6d6';
obj.onmouseover = function(){
var o = event.srcElement; if(o.tagName=="TD"){
with(o.parentElement){
style.backgroundColor = hightlightBgColor;
}
}
}
obj.onmouseout = function(){
var o = event.srcElement;
if(o.tagName=="TD"){o.parentElement.style.backgroundColor = '';}
}
}</script>
<html>
<head>
<title>编辑角色权限</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
var MENU_ID_ARRAY = new Array();
MENU_ID_ARRAY[0]="10";
MENU_ID_ARRAY[1]="15";
MENU_ID_ARRAY[2]="20";
MENU_ID_ARRAY[3]="25";
MENU_ID_ARRAY[4]="30";
MENU_ID_ARRAY[5]="35";
MENU_ID_ARRAY[6]="40";
MENU_ID_ARRAY[7]="45";
MENU_ID_ARRAY[8]="50";
MENU_ID_ARRAY[9]="55";
MENU_ID_ARRAY[10]="60";
MENU_ID_ARRAY[11]="65";
function toplevel(bname)
{
var bn = document.getElementById(bname);
bn.checked = true;
}
function check_all(menu_all,MENU_ID)
{
for (i=0;i<document.all(MENU_ID).length;i++)
{
if(menu_all.checked){
document.all(MENU_ID).item(i).checked=true;
}
else
document.all(MENU_ID).item(i).checked=false;
}
if(i==0)
{
if(menu_all.checked)
document.all(MENU_ID).checked=true;
else
document.all(MENU_ID).checked=false;
}
}function check_all_all()
{
for(j=1;j<=12;j++)
{
menu_id=MENU_ID_ARRAY[j-1]+'';
for(i=0;i<document.all(menu_id).length;i++)
{
if(menu_all.checked){
document.all(menu_id).item(i).checked=true;
}
else
document.all(menu_id).item(i).checked=false;
}
}
}function mysubmit()
{
func_id_str="";
for(j=1;j<=12;j++)
{
menu_id=MENU_ID_ARRAY[j-1]+'';
for(i=0;i<document.all(menu_id).length;i++)
{
el=document.all(menu_id).item(i);
if(el.checked)
{ val=el.value;
func_id_str+=val + ",";
}
}
if(i==0)
{
el=document.all(menu_id);
if(el.checked)
{ val=el.value;
func_id_str+=val + ",";
}
}
}
location="update_priv.jsp?FUNC_ID_STR="+ func_id_str +"&USER_PRIV=2";
}
</script>
</head>
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr class="tablehead1">
<td><img src="../../../images/menu/system.gif" align="absmiddle"> 编辑角色权限 - (
总经理 ) </td>
</tr>
<tr class="tablehead2">
<td><input type="image" title="确定" src="../../../images/button/submit.gif" onClick="mysubmit();">
<a href="index.jsp"><img src="../../../images/button/return.gif" border="0"></a> </td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="3" width="100%">
<tr>
<td valign="top" width="50%"><table border="0" cellspacing="1" cellpadding="1" align="center" width="100%"> <tr class="TableLine2">
<td nowrap>
14 <input type="checkbox" name="30" value="14" checked onClick="check_all(this,'30')">
我的人事</td>
</tr>
<tr class="TableLine1">
<td nowrap>
15 <input type="checkbox" name="30" value="15" checked onClick="toplevel(30)">
人事信息</td>
</tr>
<tr class="TableLine1">
<td nowrap>
16 <input type="checkbox" name="30" value="16" checked onClick="toplevel(30)">
单位信息</td>
</tr>
<tr class="TableLine1">
<td nowrap>
17 <input type="checkbox" name="30" value="17" checked onClick="toplevel(30)">
部门查询</td>
</tr>
<tr class="TableLine1">
<td nowrap>
18 <input type="checkbox" name="30" value="18" checked onClick="toplevel(30)">
员工查询</td>
</tr>
<tr class="TableLine1">
<td nowrap>
19 <input type="checkbox" name="30" value="19" onClick="toplevel(30)">
档案查询</td>
</tr>
<tr class="TableLine1">
<td nowrap>
39 <input type="checkbox" name="30" value="39" onClick="toplevel(30)">
人事档案管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
21 <input type="checkbox" name="30" value="21" onClick="toplevel(30)">
通讯录</td>
</tr>
<tr class="TableLine1">
<td nowrap>
22 <input type="checkbox" name="30" value="22" onClick="toplevel(30)">
个人通讯录</td>
</tr>
<tr class="TableLine1">
<td nowrap>
23 <input type="checkbox" name="30" value="23" onClick="toplevel(30)">
公共通讯录</td>
</tr>
<tr class="TableLine1">
<td nowrap>
24 <input type="checkbox" name="30" value="24" onClick="toplevel(30)">
公共通讯录设置</td>
</tr>
<tr class="TableLine1">
<td nowrap>
25 <input type="checkbox" name="60" value="25" onClick="toplevel(60)">
新闻发布</td>
</tr>
<tr class="TableLine1">
<td nowrap>
26 <input type="checkbox" name="60" value="26" onClick="toplevel(60)">
公告管理</td>
</tr>
<tr class="TableLine2">
<td nowrap>
27 <input type="checkbox" name="65" value="27" onClick="check_all(this,'65')">
系统管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
28 <input type="checkbox" name="65" value="28" onClick="toplevel(65)">
组织机构</td>
</tr>
<tr class="TableLine1">
<link rel="stylesheet" type="text/css" href="../../../theme/1/style.css">
<script language="javascript">
function highlight(obj){
var hightlightBgColor = '#d6d6d6';
obj.onmouseover = function(){
var o = event.srcElement; if(o.tagName=="TD"){
with(o.parentElement){
style.backgroundColor = hightlightBgColor;
}
}
}
obj.onmouseout = function(){
var o = event.srcElement;
if(o.tagName=="TD"){o.parentElement.style.backgroundColor = '';}
}
}</script>
<html>
<head>
<title>编辑角色权限</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
var MENU_ID_ARRAY = new Array();
MENU_ID_ARRAY[0]="10";
MENU_ID_ARRAY[1]="15";
MENU_ID_ARRAY[2]="20";
MENU_ID_ARRAY[3]="25";
MENU_ID_ARRAY[4]="30";
MENU_ID_ARRAY[5]="35";
MENU_ID_ARRAY[6]="40";
MENU_ID_ARRAY[7]="45";
MENU_ID_ARRAY[8]="50";
MENU_ID_ARRAY[9]="55";
MENU_ID_ARRAY[10]="60";
MENU_ID_ARRAY[11]="65";
function toplevel(bname)
{
var bn = document.getElementById(bname);
bn.checked = true;
}
function check_all(menu_all,MENU_ID)
{
for (i=0;i<document.all(MENU_ID).length;i++)
{
if(menu_all.checked){
document.all(MENU_ID).item(i).checked=true;
}
else
document.all(MENU_ID).item(i).checked=false;
}
if(i==0)
{
if(menu_all.checked)
document.all(MENU_ID).checked=true;
else
document.all(MENU_ID).checked=false;
}
}function check_all_all()
{
for(j=1;j<=12;j++)
{
menu_id=MENU_ID_ARRAY[j-1]+'';
for(i=0;i<document.all(menu_id).length;i++)
{
if(menu_all.checked){
document.all(menu_id).item(i).checked=true;
}
else
document.all(menu_id).item(i).checked=false;
}
}
}function mysubmit()
{
func_id_str="";
for(j=1;j<=12;j++)
{
menu_id=MENU_ID_ARRAY[j-1]+'';
for(i=0;i<document.all(menu_id).length;i++)
{
el=document.all(menu_id).item(i);
if(el.checked)
{ val=el.value;
func_id_str+=val + ",";
}
}
if(i==0)
{
el=document.all(menu_id);
if(el.checked)
{ val=el.value;
func_id_str+=val + ",";
}
}
}
location="update_priv.jsp?FUNC_ID_STR="+ func_id_str +"&USER_PRIV=2";
}
</script>
</head>
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr class="tablehead1">
<td><img src="../../../images/menu/system.gif" align="absmiddle"> 编辑角色权限 - (
总经理 ) </td>
</tr>
<tr class="tablehead2">
<td><input type="image" title="确定" src="../../../images/button/submit.gif" onClick="mysubmit();">
<a href="index.jsp"><img src="../../../images/button/return.gif" border="0"></a> </td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="3" width="100%">
<tr>
<td valign="top" width="50%"><table border="0" cellspacing="1" cellpadding="1" align="center" width="100%"> <tr class="TableLine2">
<td nowrap>
14 <input type="checkbox" name="30" value="14" checked onClick="check_all(this,'30')">
我的人事</td>
</tr>
<tr class="TableLine1">
<td nowrap>
15 <input type="checkbox" name="30" value="15" checked onClick="toplevel(30)">
人事信息</td>
</tr>
<tr class="TableLine1">
<td nowrap>
16 <input type="checkbox" name="30" value="16" checked onClick="toplevel(30)">
单位信息</td>
</tr>
<tr class="TableLine1">
<td nowrap>
17 <input type="checkbox" name="30" value="17" checked onClick="toplevel(30)">
部门查询</td>
</tr>
<tr class="TableLine1">
<td nowrap>
18 <input type="checkbox" name="30" value="18" checked onClick="toplevel(30)">
员工查询</td>
</tr>
<tr class="TableLine1">
<td nowrap>
19 <input type="checkbox" name="30" value="19" onClick="toplevel(30)">
档案查询</td>
</tr>
<tr class="TableLine1">
<td nowrap>
39 <input type="checkbox" name="30" value="39" onClick="toplevel(30)">
人事档案管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
21 <input type="checkbox" name="30" value="21" onClick="toplevel(30)">
通讯录</td>
</tr>
<tr class="TableLine1">
<td nowrap>
22 <input type="checkbox" name="30" value="22" onClick="toplevel(30)">
个人通讯录</td>
</tr>
<tr class="TableLine1">
<td nowrap>
23 <input type="checkbox" name="30" value="23" onClick="toplevel(30)">
公共通讯录</td>
</tr>
<tr class="TableLine1">
<td nowrap>
24 <input type="checkbox" name="30" value="24" onClick="toplevel(30)">
公共通讯录设置</td>
</tr>
<tr class="TableLine1">
<td nowrap>
25 <input type="checkbox" name="60" value="25" onClick="toplevel(60)">
新闻发布</td>
</tr>
<tr class="TableLine1">
<td nowrap>
26 <input type="checkbox" name="60" value="26" onClick="toplevel(60)">
公告管理</td>
</tr>
<tr class="TableLine2">
<td nowrap>
27 <input type="checkbox" name="65" value="27" onClick="check_all(this,'65')">
系统管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
28 <input type="checkbox" name="65" value="28" onClick="toplevel(65)">
组织机构</td>
</tr>
<tr class="TableLine1">
29 <input type="checkbox" name="65" value="29" onClick="toplevel(65)">
单位管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
30 <input type="checkbox" name="65" value="30" onClick="toplevel(65)">
部门管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
31 <input type="checkbox" name="65" value="31" onClick="toplevel(65)">
用户管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
32 <input type="checkbox" name="65" value="32" onClick="toplevel(65)">
角色与权限管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
33 <input type="checkbox" name="65" value="33" onClick="toplevel(65)">
系统设置</td>
</tr>
<tr class="TableLine1">
<td nowrap>
34 <input type="checkbox" name="65" value="34" onClick="toplevel(65)">
数据库管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
35 <input type="checkbox" name="65" value="35" onClick="toplevel(65)">
系统日志管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
36 <input type="checkbox" name="65" value="36" onClick="toplevel(65)">
系统资源管理</td>
</tr>
<tr class="TableLine1">
<td nowrap>
37 <input type="checkbox" name="65" value="37" onClick="toplevel(65)">
系统访问控制</td>
</tr>
<tr class="TableLine1">
<td nowrap>
38 <input type="checkbox" name="65" value="38" onClick="toplevel(65)">
系统安全设置</td>
</tr>
</table></td>
</tr>
<input type="hidden" value="2" name="USER_PRIV">
</table>
</body>
</html>
--->
window.location.href="..."
location.href=""
location 对象的默认属性就是 location.href。例如,设置 location='http://microsoft.com' 的结果就等于设置 location.href='http://microsoft.com'。
当设置此列出的任何属性后,浏览器都将立即前往指定 URL。此对象在 Microsoft® Internet Explorer 3.0 的脚本中可用。