Met Cssstyle Getpropertyvalue
# CSSStyleDeclaration getPropertyValue() Method
[ CSS CSSStyleDeclaration](#)
## Example
Return the value of the color property:
var declaration = document.styleSheets.cssRules.style; var propvalue = declaration.getPropertyValue("color"); alert(propvalue);
[Try it Yourself Β»](#)
* * *
## Definition and Usage
The getPropertyValue() method returns the value of the specified CSS property.
* * *
## Browser Support
| Method | | | | | |
| --- | --- | --- | --- | --- | --- |
| getPropertyValue() | Yes | 9.0 | Yes | Yes | Yes |
* * *
## Syntax
object.getPropertyValue(propertyname)
* * *
## Property Values
| Parameter | Description |
| --- | --- |
| _propertyname_ | Required. A string representing the name of the property to check. |
* * *
## Technical Details
| DOM Version: | CSS Object Model |
| --- |
| Return Value: | A string, representing the property value. |
[ CSS CSSStyleDeclaration](#)
YouTip