Mercurial > js4py-pl
view core-javascript/counters-example.rst @ 201:b6864a86e876 default tip
Przetłumaczone getting-started
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sun, 15 Jul 2012 13:27:27 +0200 |
| parents | 0b029e4a12f2 |
| 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 <./core-javascript-work/counters.html>`_ of what's wanted. Below is the complete code of this example. To simplify the matter, it is completely self-contained. It uses no library code, other than the definition of *SimpleClass*. 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 a library, and build libraries of your own. counters.html ------------- .. literalinclude:: /core-javascript-work/counters.html :language: html counters.css ------------ .. literalinclude:: /core-javascript-work/counters.css :language: css counters.js ----------- .. literalinclude:: /core-javascript-work/counters.js :language: javascript
