js determines whether the attribute exists (note)

Determine whether the attribute value exists

Use the attribute '.' dot  method to determine whether the attribute exists. This method will not report an underfined error when the attribute does not exist, and will continue to execute subsequent code.

Guess you like

Origin blog.csdn.net/weixin_44220845/article/details/124281135
Recommended