1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <!DOCTYPE html> <html> <head> <meta charset= "utf-8" > <title>Sample18</title> <link rel= "stylesheet" href= "sample18.css" > </head> <body> <h1>Sample18</h1> <div id= "result" ></div> <script type= "application/dart" src= "sample18.dart" ></script> <script src= "packages/browser/dart.js" ></script> </body> </html> |
1 2 3 4 5 6 7 | import 'dart:html' ; import 'dart:math' as Math; void main() { var n = Math.exp(2); querySelector( "#result" ).text = n.toString(); } |