不同版本IE对JavaScript的支持情况

https://docs.microsoft.com/zh-cn/microsoft-edge/dev-guide/whats-new/javascript-version-information?redirectedfrom=MSDN


ES5和ES6兼容情况表

http://kangax.github.io/compat-table/es6/


ECMAScript 支持矩阵

http://pointedears.de/scripts/test/es-matrix/


JScript and VBScript

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/scripting-articles/d1et7k7c(v=vs.84)


Windows Scripting

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/windows-scripting/bstcxhf7(v=vs.84)

// 以下检测结果使用的操作系统:10.0.17763.1039
"use strict";

function GetJScriptEngineInfo()
{
   var strScriptEngine = "";
   strScriptEngine += ScriptEngine() + " ";
   strScriptEngine += ScriptEngineMajorVersion() + ".";
   strScriptEngine += ScriptEngineMinorVersion() + ".";
   strScriptEngine += ScriptEngineBuildVersion();
   
   return strScriptEngine;
}

try {
    // WSH: JScript 5.8.16384
    // 支持ES3
    var version=GetJScriptEngineInfo();
    if(WScript != null)
    {
        WScript.Echo(version);
    }
} catch(e){}

try {
    // IIS: JScript 5.8.16384
    // 支持ES3
    if(Response != null)
    {
        Response.Write(version);
    }
} catch(e){}

try {
    // mshta:JScript 11.0.16384
    // ie11: JScript 11.0.16384
    // 支持ES5
    if(document != null)
    {
        document.write(version);
    }
} catch(e){}



本文链接地址: JavaScript 版本检测与ES6兼容情况
https://blog.qingfengju.com/index.asp?id=417

分类:脚本编程 查看次数:544 发布时间:2020/2/24 9:20:22

1 首先安装nodejs,并将nodejs添加到系统的PATH环境变量中。


由于包管理工具速度很慢,需要设置npm使用淘宝镜像

npm config set registry https://registry.npm.taobao.org


2 安装typings

npm install typings -g


搜索包

typings search --name jquery


3 在项目目录下安装包:

typings install dt~jquery --global --save

typings install dt~angularjs/legacy/angular --global --save

typings install dt~bootstrap --global --save


如果提示错误:

Unable to connect to "https://raw.githubusercontent.com/

搜索发现是DNS污染,于是设置 

C:\Windows\System32\drivers\etc\hosts

199.232.4.133 raw.githubusercontent.com


4 在项目目录下创建空的:jsconfig.json

重启VScode即可见智能提示(仅js文件)。


5 另可安装插件:

AngularJs 1.x Code Snippets(快捷输入代码段)

AngularDoc for Visual Studio Code(显示Angular文档)


6 调试Web项目

安装插件 Debugger for Chrome

设置 launch.json:

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome",
            "webRoot": "${workspaceFolder}",
            "file": "${workspaceRoot}/test01.html",
            "runtimeExecutable":"C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
        }
    ]
}

之后即可按F5开始调试运行。

${workspaceRoot} 等变量的意义:

https://code.visualstudio.com/docs/editor/variables-reference


本文链接地址: 前端开发1-增强VSCode的智能提示(Angularjs...)
https://blog.qingfengju.com/index.asp?id=416

分类:Web开发 查看次数:486 发布时间:2020/2/23 20:21:06