开发者

A Tag active Attribute

开发者 https://www.devze.com 2023-04-02 04:22 出处:网络
Can I toggle the \'active\' status of anelement to invoke css 开发者_开发百科a:active properties?If you hold your mouse down on the anchor element (or any element), it will invoke the active property.

Can I toggle the 'active' status of an element to invoke css 开发者_开发百科a:active properties?


If you hold your mouse down on the anchor element (or any element), it will invoke the active property. If you want to do this dynamically (in JavaScript), you can create a class, a.active, and add/remove "active" from the className property on the dom element.

0

精彩评论

暂无评论...
验证码 换一张
取 消