HTML5 input color's default color

前端 未结 7 2115
感情败类
感情败类 2021-02-01 01:16

The input type=\"color\" has a default color which is black: #000000.

Even if I give it an empty value...

7条回答
  •  死守一世寂寞
    2021-02-01 01:41

    Use value:

    
    

    If you want to know if input remain unchanged, you can do something like this (with jQuery):

    $(function(){
        $('input').change(function(){
           $(this).addClass('changed');
        })
    })
    

    http://jsfiddle.net/j3hZB/

提交回复
热议问题