Mercurial > js4py-pl
view source/counters-example.rst @ 162:77e87f1b5811 core-javascript
$ hg merge core-javascript.closure-exercises # done, at least for now
| author | jf3243 |
|---|---|
| date | Wed, 09 Nov 2011 17:00:38 +0000 |
| parents | 347e10783e7f |
| children |
line wrap: on
line source
Counters example ================ Goal ---- The goal is to create a web page which contains several independent counters. Each time a counter is clicked, it is incremented. Here's you can `try out a working example <./_downloads/counters.html>`_ of what's wanted. Below is the complete code of this example. To simplify the matter, it is completely self-contained. It does not use any library code. In general library code is a good idea. This example is designed to teach you the basics of JavaScript, and not the use of a library. We hope that what you learn here will help you choose (and contribute to) a library. counters.html ------------- .. literalinclude:: /examples/counters.html :language: html counters.css ------------ .. literalinclude:: /examples/counters.css :language: css counters.js ----------- .. literalinclude:: /examples/counters.js :language: javascript
