HTML 颜色输入框修改事件的触发,以及获取修改后的颜色

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body style=" ">
    <input type="color" onchange="ccc(this.value)"  />
</body>
<script type="text/javascript">
    function ccc(my_color) {
        console.log(my_color);
    }
</script>
</html>

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
  • 2021-08-08
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2021-04-15
  • 2022-12-23
  • 2021-09-02
相关资源
相似解决方案