- Dart:Scalable Application Development
- Davy Mitchell Sergey Akopkokhyants Ivo Balbaert
- 90字
- 2021-07-09 18:56:18
Changing the colors
HTML5 provides browsers with a full-featured color picker (typically, browsers use the native OS's color chooser). This will be used to allow the user to set the background color of the editor application itself:

The color picker is added to the index.html
page with the following HTML:
<input id="pckBackColor" type="color">
The implementation is straightforward as the color picker control provides:
InputElement cp = qs("#pckBackColor"); cp.onChange.listen((e) => document.body.style.backgroundColor = cp.value);
Because the event and property (onChange
and value
) are common to the input controls, the basic InputElement
class can be used.
推薦閱讀
- Web前端開發技術:HTML、CSS、JavaScript(第3版)
- ASP.NET MVC4框架揭秘
- R語言游戲數據分析與挖掘
- PHP+MySQL網站開發技術項目式教程(第2版)
- Data Analysis with IBM SPSS Statistics
- 21天學通C++(第6版)
- 深入淺出RxJS
- PhoneGap Mobile Application Development Cookbook
- 可解釋機器學習:模型、方法與實踐
- Odoo 10 Implementation Cookbook
- 零基礎學C語言第2版
- QGIS 2 Cookbook
- PHP與MySQL權威指南
- Apache Solr PHP Integration
- OpenCV 3.0 Computer Vision with Java