首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

请教哪位大哥能解释一下这段代码

2013-06-26 
请问哪位大哥能解释一下这段代码?Function GetRightName(inRightValue)得到权限名GetRightNameset rs_

请问哪位大哥能解释一下这段代码?
 
      Function GetRightName(inRightValue)
      '得到权限名
       GetRightName=""
       set rs_Fun=Conn.execute("select caption from menu where hidden=0 and rightvalue=" & inRightValue )
   if not rs_Fun.eof then GetRightName=rs_Fun(0)
   rs_Fun.close
   set rs_Fun=Nothing
      End Function




<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr id=menuTitle2 onClick="showsubmenu(<%=i%>)" style="cursor: hand"> 
    <td width="134" height=25 valign="middle" background="image/bg.GIF" class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; > 
      <span><%=rs_TopMenuByRightValue("caption")%></span> </td>
    <td width="25"><img src="image/hide.GIF" width="25" height="25" id=ss<%=i%>></td>
  </tr>
  <tr> 
    <td colspan="2" style="display:" id='submenu<%=i%>'>
<div class=sec_menu style="width:158">
<table cellpadding=0 cellspacing=0 align=center width=135>
<% while not rs_SubMenuByFlag.eof %>
<tr><td height=20><a href="<%= rs_SubMenuByFlag("linkfiles")%>" target="main"><%=rs_SubMenuByFlag("caption")%></a></td></tr>
        <%    rs_SubMenuByFlag.movenext
           wend %>
        </table>
</div></td>
  </tr>
</table>
[解决办法]
看了一下,上面的代码块已经说了,就是查询得到权限名,
下面的代码块 

<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr id=menuTitle2 onClick="showsubmenu(<%=i%>)" style="cursor: hand"> <!--鼠标点击的时候显示showsubmenu(<%=i%>-->
    <td width="134" height=25 valign="middle" background="image/bg.GIF" class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; > 
      <span><%=rs_TopMenuByRightValue("caption")%></span> </td> <!--读取caption,鼠标放上去时候示menu_title2,鼠标一出去的时候menu_title-->
    <td width="25"><img src="image/hide.GIF" width="25" height="25" id=ss<%=i%>></td>
  </tr>
  <tr> 
    <td colspan="2" style="display:" id='submenu<%=i%>'>
<div class=sec_menu style="width:158">


<table cellpadding=0 cellspacing=0 align=center width=135>
<% while not rs_SubMenuByFlag.eof %>
<tr><td height=20><a href="<%= rs_SubMenuByFlag("linkfiles")%>" target="main"><%=rs_SubMenuByFlag("caption")%></a></td></tr> 
        <%    rs_SubMenuByFlag.movenext
           wend %>
        </table><!--内嵌的表格是读取linkfiles和caption 内容并显示多个-->
</div></td>
  </tr>
</table> 

热点排行