Show a message if the browser is not internet explorer 9 or greater

后端 未结 10 1301
北恋
北恋 2020-12-31 01:18

I would like to show my users a bar that looks like this, if:

  1. Browser is not IE; or
  2. Browser is IE but is version 8 or earlier

10条回答
  •  無奈伤痛
    2020-12-31 01:49

    Actually in SharePoint (OP mentioned that) there is a built-in variable browseris. It's available in the global window scope. Answering OP question:

    1. Browser is not IE;
    • use browseris.ie
    1. Browser is IE but is version 8 or earlier
    • use browseris.ie8down

    (tested in SP2013 on-prem)

提交回复
热议问题