Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <title>ot4d</title>
- </head>
- <body>
- <input id="postiNumero">
- <button onclick="x();">Tarkasta</button>
- <script>
- function x(){
- var posti_nro = document.getElementById("postiNumero").value;
- var check = console.log(tarkastaPostiNumero(posti_nro));
- function tarkastaPostiNumero(numero) {
- if(posti_nro.toString().length == 5){
- return true;
- }
- else {
- return false;
- }
- }
- }
- </script>
- </body>
Add Comment
Please, Sign In to add comment