1.js 错误

var objClass = {
    foo:1,
    bar:2
};

function printf() {
    var aaa:objClass;
    aaa.foo = 2;
    console.log(objClass.bar);
}
function throwIt() {
    throw new Error("");
}

function catchIt() {
    console.log(catchIt.name);
    try {
        throwIt();
    }catch (e) {
        console.log(e.stack);
    }
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DataType</title>
    <script type="text/javascript" src="scripts/dataType.js"></script>
</head>
<body>
<p onclick="catchIt();return false;">Test</p>
</body>
</html>
View Code

相关文章:

  • 2021-12-27
  • 2021-12-31
  • 2022-01-20
  • 2021-10-04
  • 2021-07-09
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
相关资源
相似解决方案