chap3.dart
import 'dart:html'; 
 
void main() { 
  querySelector("#button").onClick.listen(sayHey); 
  querySelector("#button2").onClick.listen(sayHey2); 
} 
 
void sayHey(MouseEvent event) { 
  querySelector("#name").text = (querySelector("#name_box") as InputElement) 
      .value; 
} 
 
void sayHey2(MouseEvent event) { 
  querySelector("#name2").text = (querySelector("#name2_box") as InputElement) 
      .value; 
}