Javascript change color of text and background to input value

前端 未结 3 935
慢半拍i
慢半拍i 2020-12-03 15:38

I\'m going to use javascript to make a function for changing color of background, as well as text simultaneously - based on the value of a text input. I\'ve got the backgrou

3条回答
  •  一生所求
    2020-12-03 16:11

    document.getElementById("fname").style.borderTopColor = 'red';
    document.getElementById("fname").style.borderBottomColor = 'red';
    

提交回复
热议问题