minimal.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4. Minimal CertainTrust Demonstrator in JavaScript
  5. Demonstrates the basic usage of the CertainTrust SDK.
  6. @author Florian Volk <florian.volk@cased.de>
  7. -->
  8. <head>
  9. <meta charset="utf-8" />
  10. <title>CertainTrust Demonstrator in JavaScript</title>
  11. <!-- include these two scripts and the CSS to enable both CertainTrust and the HTI -->
  12. <script type="text/javascript" src="CertainTrust.js"></script>
  13. <script type="text/javascript" src="certainTrustHTI.js"></script>
  14. <link rel="stylesheet" type="text/css" href="certainTrustHTI.css"/>
  15. </head>
  16. <body>
  17. <script type="text/javascript">
  18. var ctObject = new CertainTrust(10);
  19. var hti = new CertainTrustHTI(ctObject);
  20. function showValues() {
  21. alert("Values of the CertainTrust object:\n"
  22. + "\nInit. value:\t" + ctObject.getF()
  23. + "\nTrust:\t" + ctObject.getT()
  24. + "\nCertainty:\t" + ctObject.getC()
  25. + "\nExpectation:\t" + ctObject.getExpectation());
  26. }
  27. </script>
  28. <br />
  29. <button type="button" onclick="showValues();">Read CertainTrust values</button>
  30. <p>
  31. <img src="logo_tudarmstadt.png" alt="Technische Universität Darmstadt" width="176" height="73" />
  32. <img src="logo_softwarecluster.png" alt="Software-Cluster" width="212" height="73" />
  33. </p>
  34. </body>
  35. </html>