emanlee

            Dim isSafari As Boolean = False
            Dim bc As HttpBrowserCapabilities = Request.Browser
            If bc.Type.IndexOf("Apple") > 0 Or bc.Type.IndexOf("Safari") > 0 Or bc.Browser.IndexOf("Apple") > 0 Or bc.Browser.IndexOf("Safari") > 0 Then
                isSafari = True
            End If
            If isSafari Then
                Me.btnGenerateRePort.Attributes.Add("onclick", "this.form.target=\'_blank\'")
            End If

 

       bool isSafari = false;
       bool isFireFox = false;
       HttpBrowserCapabilities hbc = Request.Browser;
       if (hbc.Type.IndexOf("Safari")>=0 || hbc.Type.IndexOf("Apple")>=0
           || hbc.Browser.IndexOf("Safari") >= 0 || hbc.Browser.IndexOf("Apple") >= 0)
       {
           isSafari = true;
       }
       if (hbc.Type.IndexOf("Gecko") >= 0 || hbc.Type.IndexOf("Firefox") >= 0
           || hbc.Browser.IndexOf("Gecko") >= 0 || hbc.Browser.IndexOf("Firefox") >= 0)
       {
           isFireFox = true;
       }

分类:

技术点:

相关文章:

  • 2021-09-15
  • 2021-12-18
  • 2021-11-23
  • 2021-05-12
  • 2021-08-29
  • 2021-08-29
  • 2021-08-29
  • 2021-08-29
猜你喜欢
  • 2021-08-29
  • 2021-08-29
  • 2021-08-29
  • 2021-08-29
  • 2021-08-29
  • 2021-08-29
  • 2021-06-10
相关资源
相似解决方案