12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <!DOCTYPE html>
- <html lang="eo">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width">
- <title>Konverti la centimetrojn en dioptriojn</title>
- </head>
- <body>
- <input id="cm" name="cm">
- Vi bezonas -<output id="dtp" name="dpt">??</output> dioptriojn.
- <script>
- /*
- @licstart The following is the entire license notice for the
- JavaScript code in this page.
- Copyright (C) 2019 Jorge Maldonado Ventura
- The JavaScript code in this page is free software: you can
- redistribute it and/or modify it under the terms of the GNU
- Affero General Public License as published by the Free Software
- Foundation, either version 3 of the License, or(at your option)
- any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
- @licend The above is the entire license notice
- for the JavaScript code in this page.
- */
- function cmADtp(cm) {
- return 1/cm * 100
- }
- cmInp = document.getElementById('cm')
- cmInp.oninput = function(){
- dpt = cmADtp(cmInp.value)
- document.getElementById('dtp').innerHTML = dpt
- }
- </script>
- </body>
- </html>
|