phpcn_u15822017-07-05 10:52:11
You wrote txt[0].style.color = '#f00'
If it works
Then you wrote txt.style.display = 'none'
Don’t you feel awkward?
大家讲道理2017-07-05 10:52:11
document.getElementsByTagName('a')[0].style.display = "none";
What is set using getElementsByTagName is an array, so the value needs to be indexed
伊谢尔伦2017-07-05 10:52:11
getElementsByTagName is obtained from NodeList. You need to use subscripts to obtain a specific element. The txt you use is a nodelist, which is a list of multiple elements. Please refer to https://developer.mozilla.org...