【个人意见,仅供参考】楼主不妨先试一试:直接在文章链接的后面加上登陆参数,放到浏览器地址栏里面,看看能不能直接查看文章。比如,某一篇文章的路径为http://www.xxx.com/article.asp?id=100
加上登陆参数,也就是hidden的name和value,变成
http://www.xxx.com/article.asp?id=100&s_fid=18001&pwd=800801,放到浏览器地址栏里面回车,看看是否出现登陆窗口,能不能直接查看文章。

解决方案 »

  1.   

    登录成功后,在 Cookie 中设置一个值 flag=多少,  document.cookie="flag=yes";
    取 Cookie 值:function getIndex(pageIndex){ 
         //从所有的 Cookie 中将 "pageIndex=?" 的值取出来
        var index= " ";
        var pageIndex = pageIndex +"=";
        if(document.cookie.length >0){   
    offset = document.cookie.indexOf(pageIndex);
    end=document.cookie.indexOf( "; ",offset);

    if(end == -1)   // 即此 Cookie 的值为最后一个 Cookie 值
    {
    length1 = pageIndex.length;
    str = document.cookie.substring(offset,end);
    length2 = str.length;
    temp = document.cookie.substring(length2);
    index = temp.substring(length1,length2);
    }
    else
    {
    length1 = pageIndex.length;
    str = document.cookie.substring(offset,end);
    index = str.substring(length1,(end-offset));
    }
         } 
        return parseInt(index); 
       // return index;
        } 
    修改函数 function openwn(){  form1.submit();}   function openwn(){
         var flag = getIndex("flag");
         if(flag == yes){
             // 表示已经登录
              执行相应的操作
         }else{
             // 没有登录则自动登录
              form1.submit();
         }
      }
      

  2.   

    你是想到这个页后就自动登陆吧,这样写就可以了
    <body> 
    <form name="form1" method="post" action="pxgledit.asp"> 
    <input  type="hidden" value="18001" name="s_fid" size="15"> 
    <input  type="hidden" value="800801" name="pwd" size="15"> 
    <input type="button" name="Submit" value="管理用户" onClick="openwn()"> 
    </form> 
    </body> 
    <script> 
    <!-- 
    function openwn(){  form1.submit();}  
    openwn();
    //--> 
    </script> 
      

  3.   

    这样写太浪费资源了 用Cookie记录吧