prevalue_set.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <html><head>
  2. <title>jomjol - AI on the edge</title>
  3. <meta charset="utf-8">
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <script type="text/javascript">
  6. //<![CDATA[
  7. //]]>
  8. </script>
  9. </head>
  10. <body>
  11. <table style="width:100%">
  12. <tr>
  13. Current Value:<p>
  14. <iframe name="currentvalue" id ="currentvalue" src="/setPreValue.html" title="fileserver" allowfullscreen></iframe>
  15. </tr>
  16. <tr>
  17. Input (Format = 123.456):<p>
  18. PreValue:
  19. <input type="number" id="myInput" name="myInput"
  20. pattern="[0-9]+([\.,][0-9]+)?" step="0.001"
  21. title="This should be a number with up to 4 decimal places.">
  22. <button type="button" onclick="setprevalue()">Set PreValue</button>
  23. </tr>
  24. <tr>
  25. Result:<p>
  26. <iframe name="maincontent" id ="maincontent" src="" title="fileserver" allowfullscreen></iframe>
  27. </tr>
  28. </table>
  29. <script>
  30. function setprevalue() {
  31. var inputVal = document.getElementById("myInput").value;
  32. inputVal = inputVal.replace(",", ".");
  33. _value = "/setPreValue.html?value="+inputVal;
  34. document.getElementById('maincontent').src = _value;
  35. location.reload();
  36. }
  37. </script>
  38. </body></html>