run javaScript if browser IE

beero beero
beero beero used Ask the Experts™
on
need to call a javascript file.js (html5shiv and html5shivprint) if user open a web page from a specific browser like IE
 also need to make ulter way to use audio player if browser not support html5 audio player.
  thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
I would consider looking at the modernizr javascript classes https://modernizr.com/
Consultant & Challenge Subduer
Top Expert 2009
Commented:

Author

Commented:
thanks david for your comments,
 but please, i want to use this code like this
<script type="text/javascript">
    if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent))
        document.write('<script src="somescript.js"><\/script>');
</script>

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial