Javascript 仅在IE上加载脚本

Javascript 仅在IE上加载脚本,javascript,jquery,internet-explorer,Javascript,Jquery,Internet Explorer,我只想在IE中加载这些脚本。条件注释不起作用,因为在IE 10或更高版本上,我在IE11上工作 有什么想法吗 我试过了,但它给了我一个错误 Active Server Pages error 'ASP 0138' Nested Script Block /solicitudviajes/desplazamientos.asp, line 31 A script block cannot be placed inside another script block. <s

我只想在IE中加载这些脚本。条件注释不起作用,因为在IE 10或更高版本上,我在IE11上工作

有什么想法吗

我试过了,但它给了我一个错误

Active Server Pages error 'ASP 0138' 

Nested Script Block 

/solicitudviajes/desplazamientos.asp, line 31 

A script block cannot be placed inside another script block. 




<script type="text/javascript">
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)){
    document.write('<script src="../jquery-ui/jquery-1.10.2.js"><\/script>');
    document.write('<script src="../jquery-ui/ui/jquery.ui.core.js"><\/script>');
    document.write('<script src="../jquery-ui/ui/jquery.ui.widget.js"><\/script>');
    document.write('<script src="../jquery-ui/ui/jquery.ui.dialog.js"><\/script>');
    document.write('<script src="../jquery-ui/ui/jquery.ui.button.js"><\/script>');
    document.write('<script src="../jquery-ui/ui/jquery.ui.position.js"><\/script>');
    document.write('<script src="../jquery-ui/js/jquery-ui-1.10.4.custom.min.js');
}
</script>
活动服务器页面错误“ASP 0138”
嵌套脚本块
/征求意见书/desplazamientos.asp,第31行
脚本块不能放在另一个脚本块内。
if(/MSIE\d | Trident.*rv:/.test(navigator.userAgent)){
文件。写(“”);
文件。写(“”);
文件。写(“”);
文件。写(“”);
文件。写(“”);
文件。写(“”);

document.write(“您需要识别浏览器。有一些库可以为您执行此操作。更简单的方法是使用以下内容:


你有服务器端语言吗?它通常可以选择你正在使用的浏览器,否则你可以使用js检测并包含脚本。我以前尝试过重复问题的答案,但它给了我一个错误,这就是为什么我再次问这个问题Active server Pages错误“ASP 0138”嵌套脚本块/requestudviajes/desplazamientos.asp,第31行无法将脚本块放置在另一个脚本块中。这是asp未验证文档的问题。您可能可以使用CDATA注释来解决此问题。但是,asp与此处所问的问题不同。