Last active
May 10, 2019 15:35
-
-
Save purplecandy/02e27326c073de360f14bb9a9726f1c9 to your computer and use it in GitHub Desktop.
Input test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Copyright 2015 the Dart project authors. All rights reserved. | |
Use of this source code is governed by a BSD-style license | |
that can be found in the LICENSE file. --> | |
<h2>Listening to input</h2> | |
<br> | |
<p>Enter text to echo:</p> | |
<input type="text"> | |
<p id="output"></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2012 the Dart project authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license | |
// that can be found in the LICENSE file. | |
import 'dart:html'; | |
void main() { | |
var output = querySelector('#output'); | |
InputElement input = querySelector('input'); | |
input.onKeyUp.listen((event){ | |
// print(input.value); | |
output.innerHtml = input.value; | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright 2015 the Dart project authors. All rights reserved. */ | |
/* Use of this source code is governed by a BSD-style license */ | |
/* that can be found in the LICENSE file. */ | |
input { | |
width: 250px; | |
margin-left: 2em; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment