1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <!DOCTYPE html> <html> <head> <meta charset= "utf-8" > <title>Sample12</title> <link rel= "stylesheet" href= "sample12.css" > </head> <body> <h1>Sample12</h1> <div id= "result1" ></div> <div id= "result2" ></div> <script type= "application/dart" src= "sample12.dart" ></script> <script src= "packages/browser/dart.js" ></script> </body> </html> |
1 2 3 4 5 6 7 8 | import 'dart:html' ; void main() { var n = 0.1234; var str = "Dartサンプルテキスト" ; querySelector( "#result1" ).text = n.toString(); querySelector( "#result2" ).text = str; } |