- 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.
推薦閱讀
- Python數據分析(第2版)
- Learning Unity 2D Game Development by Example
- Python之光:Python編程入門與實戰
- ExtJS高級程序設計
- Node.js:來一打 C++ 擴展
- 數字媒體技術概論
- 計算機組裝與維護(第二版)
- Java EE 7 Development with WildFly
- Python繪圖指南:分形與數據可視化(全彩)
- AI輔助編程Python實戰:基于GitHub Copilot和ChatGPT
- 算法學習與應用從入門到精通
- Python for Secret Agents
- 設計模式之禪
- C++程序設計基礎(下)
- Java程序設計項目教程(第二版)