js有向IE添加收藏的代码,
返过来,有没有读取IE收藏夹的代码呢

解决方案 »

  1.   

    js 是不能的
    只能acx来弄了,js没有权利读取用户的收藏夹
      

  2.   

    我就是不想用acx来搞,,真搞不明白,js有权添加,就没有权读取
      

  3.   

    js 没法读取
    c# 可以看下wuyq11大牛的回答
    ---
    我改了下asp.net 下protected void Page_Load(object sender, EventArgs e)
        {   
                   //收藏夹的位置
                    Response.Write(Environment.GetFolderPath(Environment.SpecialFolder.Favorites) + "<br/>");
            string floderName = Environment.GetFolderPath(Environment.SpecialFolder.Favorites);
           
            DirectoryInfo TheFolder = new DirectoryInfo(floderName);
           
            //遍历文件
            string fitler = ".url";
            string URLPrefix="URL=";
            foreach (FileInfo NextFile in TheFolder.GetFiles())
            {
                //NextFile.
               
                string myStr = string.Empty;
                if (NextFile.FullName.ToLower().EndsWith(fitler.ToLower()))
                {
                    Response.Write(NextFile.Name + "<br/>");
                    using (StreamReader sr = new StreamReader(NextFile.FullName, Encoding.Default))
                    {
                        myStr = sr.ReadLine();
                       
                        while (myStr != null)
                        {
                           // Response.Write(myStr + "<br/>");
                            if (myStr.ToLower().StartsWith(URLPrefix.ToLower()))
                            {
                                string myUrl = myStr.Substring(URLPrefix.Length);
                                Response.Write(myUrl + "<br/>");                        }
                             myStr = sr.ReadLine();
                        }
                    }
                }        }
             }
      

  4.   


    请问你读取的服务器的,,不是用户的电脑,asp.net 是服务器语言
      

  5.   

    你那个代码,就算能读到也是服务器的收藏夹,只是你本机和服务器是同一样机,才出现正确的信息,你换不同机子试一下,
    我的试过了,,这个代码不是插件的吧,asp.net C#只是服务器语言,,怎么能读到本机的信息,,除了cookie之外,
    只有插件和js能读到本机的
      

  6.   

    csdn现在广告真多,,真的没人来回一下吗