当前位置:编程学习 > C#/ASP.NET >>

屏蔽浏览器(page_onload事件中)


 protected void Page_Load(object sender, EventArgs e)
 {
        foreach (InternetExplorer ie in new ShellWindowsClass())
        {
              string currenturl = ie.LocationURL;
              ie.ToolBar = 0;
              ie.AddressBar = false;
              ie.MenuBar = false;
              ie.StatusBar = false;
         }
 }

此代码可以屏蔽 IE 浏览器的工具栏,地址栏,和菜单栏,但
1:若是在一个浏览器(带选项卡)中,打开多个WEB页面的就没有办法屏蔽。
2:ie.LocationURL可以获取  非IE浏览器打开的页面地址(如360浏览器),却不能把它屏蔽。
若有好解决方法的朋友,请赐教
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,