http://expert.csdn.net/Expert/topic/1607/1607138.xml?temp=.1489527

解决方案 »

  1.   

    response.Write "<input type=checkbox value=固定 id=IsTop"&rsURL("ID")&" onClick=""window.open('ChangeIsTop.asp?to=Not&id="&rsURL("ID")&"','改变固定顶端','width=10,height=10')"" checked>"
      

  2.   

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    <!--#include file="../Connections/MySiteConnection.asp" -->
    <!--#include file="../function.asp" -->
    <html>
    <head>
    <title>
    <%
      '定义链接类型
      if request("Type")=empty then
         ThisType="MyLink"
      else
         ThisType=request("Type")
      end if
      if ThisType="MyLink" then
         TypeStr="常去的老地方"
      else
       TypeStr="临时链接" 
      end if  
      '输出标题
      if ThisType="MyLink" then
         response.Write("常去的老地方")
      else
         response.Write("保存的临时链接")
      end if  
    %>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link href="../MySite.css" rel="stylesheet" type="text/css">
    </head>
    <body bgcolor="#3399CC">
    <form name="gb" id="gb">
      <div align="center"><%=TypeStr%>:<a href="AddURL.asp?Type=<%=ThisType%>">添加新的链接</a> 
      </div>
      <p> 
      <table width="90%" border="1" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="73%"><div align="center">链接名称</div></td>
          <td width="16%"><div align="center">固定顶端</div></td>
          <td width="11%"><div align="center">删除</div></td>
        </tr>
        <%
      '删除URL
      if request("dz")="Del" then
         Lib_DelURL request("DelID")
      end if
      '返回URL集合
      Set rsURL = Lib_ReadURL(ThisType)
      If rsURL Is Nothing Then
         response.Write "读取数据失败!"
     response.End()
      end if
      '显示URL
      while not rsURL.eof 
            response.Write "<tr>"
    response.Write "<td><div align=center>"
    response.Write "<a href="&rsURL("Address")&" target=_blank>"
            response.Write rsURL("LinkName")&"</a>"
    response.Write "</div></td>"
    response.Write "<td><div align=center>"
    'response.Write rsURL("IsTop")
    if rsURL("IsTop")="Yes" then
       response.Write "<input type=checkbox value=固定 id=IsTop"&rsURL("ID")&" onClick=""window.open('ChangeIsTop.asp?to=Not&id="&rsURL("ID")&"','改变固定顶端','width=10,height=10')"" checked>"
    else
       response.Write "<input type=checkbox value=不固定 id=IsTop"&rsURL("ID")&" onClick=""window.open('ChangeIsTop.asp?to=Yes&id="&rsURL("ID")&"','改变固定顶端','width=10,height=10')"">"
    end if   
    response.Write "</div></td><td><div align=center>"
    response.Write "<a href=ShowMyLink.asp?DelID="&rsURL("ID")&"&Type="&ThisType&"&dz=Del>删除</a>"
    response.Write "</div></td></tr>"

            rsURL.movenext
      wend
    %>
        <tr> 
          <td colspan="3"><div align="center"><a href="#a" OnClick="location.reload();">手动刷新</a> 
              自动刷新 
              <input name="rload" type="checkbox" id="rload" value="auto"  alt="选中将不会每次修改自动刷新" checked>
            </div>
            <div align="center"></div></td>
        </tr>
      </table>
    </form>
    </body> 
    </html>
    'ChangeIsTop.asp<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    <!--#include file="../Connections/MySiteConnection.asp" -->
    <!--#include file="../function.asp" -->
    <%
      ChangeTo =request("to")
      ID       =request("ID")
      'response.Write ChangeTo&ID
      Lib_ChangeIsTop ID,ChangeTo
    %>
    <script language="JavaScript">
      if(window.opener.gb.rload.checked)
           window.opener.location.reload();  
      close();
    </script>
    <html>
    <head>
    <title>改变</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body bgcolor="#3399CC"></body>
    </html>