allasan,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
p {
font-size: 20px;
}
</style>
<script>
window.addEventListener("DOMContentLoaded", function() {
var p = document.querySelector('p'),style = p.getAttribute('style');
p.removeAttribute('style');
var fontSize = window.getComputedStyle(p,null).getPropertyValue("font-size");
p.setAttribute('style', style);
alert(fontSize);
});
</script>
</head>
<body>
<p style="font-size:40px;">просто пример</p>
</body>
</html>