<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Sample17</title> <link rel="stylesheet" href="sample17.css"> </head> <body> <h1>Sample17</h1> <div id="result"></div> <script type="application/dart" src="sample17.dart"></script> <script src="packages/browser/dart.js"></script> </body> </html>
import 'dart:html'; void main() { var num1 = 14; var num2 = 3; var n = num1 % num2; querySelector("#result").text = n.toString(); }