且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用jQuery根据输入字段值更新backgroundColor LIVE?

更新时间:2023-02-12 10:07:23

将第二个bgColor替换为$(this).val().

您已将起始值分配给bgColor,然后再也不会为其重新分配新值.

You have assigned the starting value to bgColor, and then you never reassign a new value to it.

jsFiddle .