Reset element color to default stylesheet color (jQuery, JavaScript)

前端 未结 3 922
囚心锁ツ
囚心锁ツ 2021-02-18 13:35

I need to be able to reset an input field back to its original color after it has been possibly changed via javascript to a different value. The problem is I do not want to har

3条回答
  •  甜味超标
    2021-02-18 14:37

    Fine, but you have to specify the color inside quote and id of the input on what color should change.

    This will work :)

    $("#InputIdName").css('color', '#979797'); 
    

提交回复
热议问题