- 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.
推薦閱讀
- GraphQL學習指南
- 數據結構習題精解(C語言實現+微課視頻)
- MySQL數據庫管理與開發(慕課版)
- JavaScript+Vue+React全程實例
- 用Python實現深度學習框架
- R Data Analysis Cookbook(Second Edition)
- 蘋果的產品設計之道:創建優秀產品、服務和用戶體驗的七個原則
- Test-Driven Machine Learning
- Java SE實踐教程
- ScratchJr趣味編程動手玩:讓孩子用編程講故事
- Python編程:從入門到實踐(第3版)
- JavaScript+jQuery網頁特效設計任務驅動教程
- Python硬件編程實戰
- Web前端開發最佳實踐
- Web開發新體驗