从 Underscore.js 开始(一个简单的 运行 程序)
Starting up with Underscore.js (A simple running program)
我是一名 UI/Ux 设计师,担心开始使用 underscore.js。我使用了 jquery、jquery-ui 和其他 javascript 库,我们在其中添加了 cdn 并启动了事件和 类 来完成我们的工作完毕。
我想从 underscore.js 的一个简单程序开始,但我没有像 'w3schools.com' 中的任何有价值的教程来开始。有人可以帮我用一个简单的 运行 程序吗?
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
</head>
<body>
//underscore code goes here ...
</body>
</html>
当我懒得设置 JSFiddle 来尝试下划线的东西时,我只是 google for underscore jsfiddle [underscore function name]。 Google 将 return 一些 JSFiddle 示例(大部分)设置正确并且您已经可以尝试 out/modify:
_.each(list, iteratee, [context])
_.template(templateString, [settings])
我是一名 UI/Ux 设计师,担心开始使用 underscore.js。我使用了 jquery、jquery-ui 和其他 javascript 库,我们在其中添加了 cdn 并启动了事件和 类 来完成我们的工作完毕。
我想从 underscore.js 的一个简单程序开始,但我没有像 'w3schools.com' 中的任何有价值的教程来开始。有人可以帮我用一个简单的 运行 程序吗?
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
</head>
<body>
//underscore code goes here ...
</body>
</html>
当我懒得设置 JSFiddle 来尝试下划线的东西时,我只是 google for underscore jsfiddle [underscore function name]。 Google 将 return 一些 JSFiddle 示例(大部分)设置正确并且您已经可以尝试 out/modify:
_.each(list, iteratee, [context])
_.template(templateString, [settings])